diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-06-07 19:07:58 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-06-07 19:07:58 +0000 |
| commit | fba6fc61eb86bcf43a0e25afb59ce539fbe96c7e (patch) | |
| tree | b44388632a63dfcdfc70b9a7a418addece8747d6 | |
| parent | 0eb40587eba25100fcd1eb4f2066c2b0816cd7f7 (diff) | |
| download | puzzles-fba6fc61eb86bcf43a0e25afb59ce539fbe96c7e.zip puzzles-fba6fc61eb86bcf43a0e25afb59ce539fbe96c7e.tar.gz puzzles-fba6fc61eb86bcf43a0e25afb59ce539fbe96c7e.tar.bz2 puzzles-fba6fc61eb86bcf43a0e25afb59ce539fbe96c7e.tar.xz | |
James Harvey (again) points out an array underrun in the new
clash-checking code in Solo. (valgrind confirms it.)
[originally from svn r5916]
| -rw-r--r-- | solo.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 * in a single row, column, or box). */ - if ((ds->entered_items[x*cr+d-1] & 2) || - (ds->entered_items[y*cr+d-1] & 8) || - (ds->entered_items[((x/r)+(y/c)*c)*cr+d-1] & 32)) + if (d && ((ds->entered_items[x*cr+d-1] & 2) || + (ds->entered_items[y*cr+d-1] & 8) || + (ds->entered_items[((x/r)+(y/c)*c)*cr+d-1] & 32))) highlight |= 16; draw_number(fe, ds, state, x, y, highlight); |