diff options
| author | Simon Tatham <anakin@pobox.com> | 2021-03-14 22:05:23 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2021-03-29 20:57:42 +0100 |
| commit | 1fcb61cffe538c11a11fc2ec94d6470a61df019e (patch) | |
| tree | ddd7036aa62bf7351e4ce8e26f601f01030d71a1 /nestedvm.c | |
| parent | ff3e762fd0078836243011ca91210f32ea7d1cbd (diff) | |
| download | puzzles-1fcb61cffe538c11a11fc2ec94d6470a61df019e.zip puzzles-1fcb61cffe538c11a11fc2ec94d6470a61df019e.tar.gz puzzles-1fcb61cffe538c11a11fc2ec94d6470a61df019e.tar.bz2 puzzles-1fcb61cffe538c11a11fc2ec94d6470a61df019e.tar.xz | |
Filling: fix assertion failure in 3x1 game generation.
This would come up on the game id "3x1#12345", for example. The
failing assertion was (s->board[f] != EMPTY) in expand(), called in
turn from learn_expand_or_one().
It looks as if the problem was that the #define SENTINEL was set too
small. It was intended to be a value that can't coincide with the true
size of any region - and it was set to precisely the area of the whole
board. But on a 3x1 grid, that _can_ coincide with the size of a
region! So a board entry was set to a real region size, and then
mistaken for SENTINEL by another part of the code.
Easy fix: set SENTINEL to be sz+1. Now it really can't coincide with a
region area.
Diffstat (limited to 'nestedvm.c')
0 files changed, 0 insertions, 0 deletions