MAINTAINERS: bug-gnu-chess@prep.ai.mit.edu SUBJECT: Bugs in game (4.0.pl77) (with patch) Two bugs: In game.c, skip() will skip past the end of the array when there are no spaces left on the line. Fixed that by checking for end-of-string. In the same file, the code that processes moves in GameList[] assumes that the gmove field's from and to components are in range; this can cause core dumps when they're not. Rather than checking those values everywhere they're used, I modified the input function (GetGame()) to ensure they're correct. At the same time, I introduced MOVE2FROM() and MOVE2TO() macros to extract those parts of gmove. Be aware that the to-part of the move was sometimes being masked off with 0x7F and sometimes with 0xFF; I couldn't see a reason for the difference, so the macro uses 0x7F everywhere. If you want them, I can supply sample input files that trigger both of these behaviors. By the way, game would also have an array-bounds error if there were more than 512 moves in an input file (whether or not any legal game can ever proceed so long). I didn't try to address that problem.