Skip to content

Commit

Permalink
GH-5 Fix Life-1D read one past end of buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
SirWumpus committed Jul 28, 2024
1 parent 9e30415 commit 2a805bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/life1d.p4
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2a805bc

Please sign in to comment.