simon-git: puzzles (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Dec 22 20:16:19 GMT 2024
TL;DR:
5099e4c Cosmetic fix for mouse-to-tile coordinate transformation.
59954d6 groupsolver: fix segfault accessing solver->names.
5eea14c groupsolver: fix assertion failure.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2024-12-22 20:16:19
commit 5099e4c6d466b0d47069bfbdf1ac94727e669381
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=5099e4c6d466b0d47069bfbdf1ac94727e669381;hp=5e7400403c2f711352255f373b50850d4b2f4e63
Author: Bo Lindbergh <blgl at stacken.kth.se>
Date: Fri Dec 20 18:00:53 2024 +0100
Cosmetic fix for mouse-to-tile coordinate transformation.
Clicking just outside the left or top edges of the grid in Pattern
has the same effect as clicking just inside the same edge.
This happens because the FROMCOORD macro uses integer division,
which rounds towards zero rather than towards negative infinity.
One way to fix this is to add TILE_SIZE before the division
and subtract 1 afterwards.
pattern.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
commit 59954d67f56b353ee560fa261071bf23141fb940
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=59954d67f56b353ee560fa261071bf23141fb940;hp=5099e4c6d466b0d47069bfbdf1ac94727e669381
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Dec 22 11:55:50 2024 +0000
groupsolver: fix segfault accessing solver->names.
Reproduced via 'groupsolver -v 5i:l5_2b5h' (thanks to Arun Giridhar
for the report).
We had filled in subsolver.names, but then called
latin_solver_alloc(&subsolver), which nulled out that pointer again.
Solution: do those two things in the opposite order.
latin.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
commit 5eea14c6c3814484d7c74c885e88f48095e93d53
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=5eea14c6c3814484d7c74c885e88f48095e93d53;hp=59954d67f56b353ee560fa261071bf23141fb940
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Dec 22 20:08:14 2024 +0000
groupsolver: fix assertion failure.
Reproduced via 'groupsolver -v 5i:p1g4' (thanks to Arun Giridhar for
the report).
The Group-specific solver_hard() function ruled out a bunch of
possibilities by deducing various things that couldn't be the group
identity, but forgot to set done_something = true, so that it return 0
claiming it hadn't done anything.
So latin_solver_top progressed to the next difficulty level and tried
recursion. And latin_solver_recurse failed an assertion because it was
surprised to find a cell with only one possibility - it expected that
the _simple_ deductions would have ruled out any of those, which they
would have if solver_hard() had returned >0, because the loop would
have reset to the top and tried the easy deductions again after
solver_hard() had given them something to work with.
unfinished/group.c | 2 ++
1 file changed, 2 insertions(+)
More information about the tartarus-commits
mailing list