simon-git: puzzles (master): puzzles.git

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Dec 11 09:33:21 GMT 2016


TL;DR:
  cf6e4e2 Correct a logic error in Unequal game desc validation.

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: master
Committer:      puzzles.git
Date:           2016-12-11 09:33:21

commit cf6e4e272c2aa3477f149eb75ffe0436e1a8a2b0
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=cf6e4e272c2aa3477f149eb75ffe0436e1a8a2b0;hp=b95812963a8d187526145f5e1a9693f10eee2b65
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Dec 11 09:19:30 2016 +0000

    Correct a logic error in Unequal game desc validation.
    
    A user points out that the error check that should have detected a
    non-digit where a digit should have been was never firing, due to an
    && that should have been ||.
    
    I don't think it was a harmful error - the subsequent check that the
    number was in range, plus the skipping past only digits to find the
    next part of the string, combine to arrange that not many kinds of
    invalid game id could actually get through.
    
    But it did have the small effect that a 0 could be elided without
    triggering an error, e.g. the game ids
    
      4:0,0,0,0,0,0L,0,0,0R,0U,0,0L,0,0,,3,
      4:0,0,0,0,0,0L,0,0,0R,0U,0,0L,0,0,0,3,
    
    would both be accepted, and would be decoded into the same game, even
    though the former should have failed syntax validation. Now it does.

 unequal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the tartarus-commits mailing list