mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
latin.c: remove a rogue array overrun.
Oops! This was left over from an early development version of commits 4408476b7 and 000ebc507, in which I initially arranged for each adjacency list to be terminated with the sentinel value -1 instead of separately storing an array of the lists' lengths. I later changed the representation to make randomising the algorithm easier (it's much easier to shuffle an array uniformly at random if you _don't_ have to faff endlessly to work out its length). But this write of a no-longer- needed sentinel value in the client code must have survived the rewrite by mistake, and also somehow evaded all my pre-commit testing with valgrind and asan. A user reported that the Towers Javascript version was crashing on startup, and I think this is the cause, because it seems to fix it for me.
This commit is contained in: