• Eli Zaretskii's avatar
    Fix bugs in update-game-score, on MS-Windows and elsewhere. · 98a428c1
    Eli Zaretskii authored
     lib-src/update-game-score.c (read_score): Try reading a character before
     probing the stream for EOF.  Initialize score->score to zero,
     before reading and accumulating the score.
     (read_scores): Fix logic that determines which value to return.
     Close the input stream when finished reading the scores (avoids
     failures in overwriting the file with a new one on MS-Windows,
     since a file that is open cannot be deleted).
     lib-src/ntlib.h (rename): Don't undefine.
     lib-src/ntlib.c (sys_rename): New function, needed for
ntlib.h 2.61 KB