When a game was adjudicated (e.g. because XBoard detected mate) GameEnds
would trigger an exit if it was the last game of the match, and thus
never returned, while the ShowMove was called only after return from
Adjudicate. An extra ToNrEvent is now used in GameEnd in this case to
cause ShowMove to be called before exiting. (Ugly kludge...)
if(popupRequested) { // [HGM] crash: this calls GameEnds recursively through ExitEvent! Make it a harmless tail recursion.
if(matchMode == TRUE) { // match through command line: exit with or without popup
if(ranking) {
+ ToNrEvent(forwardMostMove);
if(strcmp(ranking, "busy")) DisplayFatalError(ranking, 0, 0);
else ExitEvent(0);
} else DisplayFatalError(buf, 0, 0);