From 2a805bc4487c453bf1ab00d433f1affb853ef885 Mon Sep 17 00:00:00 2001 From: Anthony Howe Date: Sun, 28 Jul 2024 07:56:18 -0400 Subject: [PATCH] GH-5 Fix Life-1D read one past end of buffer. --- examples/life1d.p4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/life1d.p4 b/examples/life1d.p4 index f93ec04..d7bb593 100644 --- a/examples/life1d.p4 +++ b/examples/life1d.p4 @@ -2,6 +2,9 @@ \ \ https://en.wikipedia.org/wiki/Cellular_automaton \ +\ Scientific America, Computer Recreations, May 1985, pg. 18-30 +\ Glider Gun Guidelines, Stephen Wolfram, March 1985 +\ MARKER rm_life1d @@ -47,7 +50,7 @@ CHAR . CONSTANT off ; : life1d_transition ( -- ) - life1d_size 1 DO + life1d_size 1- 0 DO I life1d_curr_state \ value I life1d_next_state \ -- LOOP