mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
James Harvey (again) points out an array underrun in the new
clash-checking code in Solo. (valgrind confirms it.) [originally from svn r5916]
This commit is contained in:
4
solo.c
4
solo.c
@ -2238,9 +2238,9 @@ static void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
|
|||||||
|
|
||||||
/* Mark obvious errors (ie, numbers which occur more than once
|
/* Mark obvious errors (ie, numbers which occur more than once
|
||||||
* in a single row, column, or box). */
|
* in a single row, column, or box). */
|
||||||
if ((ds->entered_items[x*cr+d-1] & 2) ||
|
if (d && ((ds->entered_items[x*cr+d-1] & 2) ||
|
||||||
(ds->entered_items[y*cr+d-1] & 8) ||
|
(ds->entered_items[y*cr+d-1] & 8) ||
|
||||||
(ds->entered_items[((x/r)+(y/c)*c)*cr+d-1] & 32))
|
(ds->entered_items[((x/r)+(y/c)*c)*cr+d-1] & 32)))
|
||||||
highlight |= 16;
|
highlight |= 16;
|
||||||
|
|
||||||
draw_number(fe, ds, state, x, y, highlight);
|
draw_number(fe, ds, state, x, y, highlight);
|
||||||
|
Reference in New Issue
Block a user