Permalink
Browse files

fix REPL crash (ignoring BOUNDS_CHECK for now)

  • Loading branch information...
jacob1 committed Aug 11, 2014
1 parent 7740980 commit 774fb880021193d2a706723fefc0809c6aa21a1c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/simulation/elements/REPL.cpp
@@ -54,7 +54,7 @@ int Element_REPL::update(UPDATE_FUNC_ARGS)
{
rx = (rand()%21)-10;
ry = (rand()%21)-10;
if (BOUNDS_CHECK && (rx || ry))
if (x+rx >= 0 && x+rx < XRES && y+ry >= 0 && y+ry < YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
if (!r)

0 comments on commit 774fb88

Please sign in to comment.