simon-git: puzzles (main): Ben Harris
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Feb 26 23:21:25 GMT 2023
TL;DR:
5a491c5 Inertia: insist that solutions must be non-empty
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Ben Harris <bjh21 at bjh21.me.uk>
Date: 2023-02-26 23:21:25
commit 5a491c5ad333ef34c1e7713f920f51cbb205af60
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=5a491c5ad333ef34c1e7713f920f51cbb205af60;hp=6ee62a43abe7d7e77226415b21d1cbf16dbda85a
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Sun Feb 26 23:18:44 2023 +0000
Inertia: insist that solutions must be non-empty
Any solution actually generated by the solver will contain at least one
move, because it refuses to solve games that are already solved.
However, a save file might contain an empty "solve" move. This causes
an uninitialised read when execute_move() then tries to check if the
next move is in accordance with the solution, because the check for
running off the end of the solution happens after that.
We now avoid this by treating a zero-length "solution" as an invalid
move.
inertia.c | 1 +
1 file changed, 1 insertion(+)
More information about the tartarus-commits
mailing list