From: Alan Cox Date: Sat, 20 May 2017 15:49:22 +0000 (+0100) Subject: qrun: fix a nasty memory scribble X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9d5556c564f20169b80534c880eb28a131888d0f;p=FUZIX.git qrun: fix a nasty memory scribble Also clean up the graphics check --- diff --git a/Applications/games/qrun.c b/Applications/games/qrun.c index 4f011023..14dbb1c3 100644 --- a/Applications/games/qrun.c +++ b/Applications/games/qrun.c @@ -1130,7 +1130,7 @@ static void initgame(void) state.flags[n] = 0; NUMCAR = 0; - for (n = 0; n < 255; n++) { + for (n = 0; n < nobj; n++) { state.objpos[n] = zmem(obase + n); if (state.objpos[n] == 254) NUMCAR++; @@ -1736,7 +1736,7 @@ static void initdisplay(void) has_gfx = 0; return; } - if (m.commands & (GFX_WRITE | GFX_DRAW) == (GFX_WRITE | GFX_DRAW)) + if ((m.commands & (GFX_WRITE | GFX_DRAW)) == (GFX_WRITE | GFX_DRAW)) has_gfx = 1; pixw = m.width; pixh = m.height;