Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/games/gomoku



Module Name:    src
Committed By:   rillig
Date:           Sat May 21 19:02:15 UTC 2022

Modified Files:
        src/games/gomoku: main.c stoc.c

Log Message:
gomoku: fix error handling when reading moves from a file

The columns of the board are labeled from A to H and J to T, which makes
I5 or i5 an invalid coordinate.  Previously, reading this invalid
coordinate from a file resulted in the string "<6" appearing in the move
log.

The 'i' was converted into the nonexistent column 20, and PT(20, 5) got
an out-of-bounds argument, resulting in spot 120.  Converting this spot
back into coordinates resulted in PT(0, 6).  The '<' comes from
'letters[0]'.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/games/gomoku/main.c
cvs rdiff -u -r1.19 -r1.20 src/games/gomoku/stoc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index