I think this is causing a problem after a won command.
Instead of doing that, which would have fixed only one game, I did a more global fix. In the won, resign, and lost commands, I replaced $movenum, which is recorded in the log, with $mline[$mln]->movenum, which is generated by the program and indicates the number of the current move.
Instead of doing that, which would have fixed only one game, I did a more global fix. In the won, resign, and lost commands, I replaced $movenum, which is recorded in the log, with $mline[$mln]->movenum, which is generated by the program and indicates the number of the current move.