Skip to content

Commit

Permalink
fix REPL crash (ignoring BOUNDS_CHECK for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Aug 11, 2014
1 parent 7740980 commit 774fb88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simulation/elements/REPL.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 774fb88

Please sign in to comment.