From 774fb880021193d2a706723fefc0809c6aa21a1c Mon Sep 17 00:00:00 2001 From: jacob1 Date: Mon, 11 Aug 2014 01:11:58 -0400 Subject: [PATCH] fix REPL crash (ignoring BOUNDS_CHECK for now) --- src/simulation/elements/REPL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/elements/REPL.cpp b/src/simulation/elements/REPL.cpp index e0823ecf7..fd7f7cc2f 100644 --- a/src/simulation/elements/REPL.cpp +++ b/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)