simon-git: puzzles (main): Ben Harris

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Jan 28 00:46:00 GMT 2023


TL;DR:
  a98ac4b Don't allow Bridges games with < 2 islands

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-01-28 00:46:00

commit a98ac4bb428ab5c1ff665aa1def6cc14d02a4e19
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=a98ac4bb428ab5c1ff665aa1def6cc14d02a4e19;hp=1f72a1a2ecc89ba789a0b665a5e39da5febe27d2
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date:   Sat Jan 28 00:45:38 2023 +0000

    Don't allow Bridges games with < 2 islands
    
    Technically, a game with no islands is always solved, but it causes a
    null-pointer dereference at startup because there's nowhere to put the
    cursor.  Games with one island are always insoluble because the island
    must have at least one bridge and there's nowhere for it to go.  So
    the minimum playable game has two islands.
    
    To demonstrate the segfault, try loading this save file:
    
    SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
    VERSION :1:1
    GAME    :7:Bridges
    PARAMS  :1:3
    CPARAMS :1:3
    DESC    :1:i
    NSTATES :1:1
    STATEPOS:1:1

 bridges.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)



More information about the tartarus-commits mailing list