diff options
| author | Simon Tatham <anakin@pobox.com> | 2013-05-10 17:56:00 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2013-05-10 17:56:00 +0000 |
| commit | b6ee9debcfe46c7ed4e958511e754f150f4e9773 (patch) | |
| tree | c32b2c193072d563fce1a8c28900434de49e5dab /nullgame.R | |
| parent | e5df38fa152115c02938e6360fc66ae02f5251bf (diff) | |
| download | puzzles-b6ee9debcfe46c7ed4e958511e754f150f4e9773.zip puzzles-b6ee9debcfe46c7ed4e958511e754f150f4e9773.tar.gz puzzles-b6ee9debcfe46c7ed4e958511e754f150f4e9773.tar.bz2 puzzles-b6ee9debcfe46c7ed4e958511e754f150f4e9773.tar.xz | |
Fix grid generation crashes at Penrose 3x3 sizes. What seemed to be
happening was that at the point of calling grid_make_consistent, the
grid had no faces or vertices, probably because grid_trim_vigorously
had removed them all, causing grid_make_consistent to try to allocate
a negative amount of memory and die in snewn.
Fixed by detecting this case in new_desc_penrose and retrying until
generation is successful. (It wasn't happening 100% of the time, just
_most_ of the time.) The same verification step is also used in
validate_desc_penrose in case a user manages to manually construct a
set of parameters leading to this failure mode.
[originally from svn r9840]
Diffstat (limited to 'nullgame.R')
0 files changed, 0 insertions, 0 deletions