From: Joe Wreschnig Date: Thu, 4 Apr 2013 10:38:17 +0000 (+0200) Subject: Fix integer-size bug in score file parsing / printing. X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=92078a936afc1445641c9fbcaa77d656f0cd6403;p=rogue-pphs.git Fix integer-size bug in score file parsing / printing. --- diff --git a/rip.c b/rip.c index 809ba6a..352313d 100644 --- a/rip.c +++ b/rip.c @@ -155,12 +155,14 @@ char monst; if ((rogue_ver == 36) && (scorefile_ver == 2)) for(i = 0; i < 10; i++) { + int monster; encread((char *) &top_ten[i].sc_name, 80, fd); encread((char *) &top_ten[i].sc_login, 8, fd); encread((char *) scoreline, 100, fd); sscanf(scoreline, " %d %d %d %d \n", &top_ten[i].sc_score, &top_ten[i].sc_flags, - &top_ten[i].sc_level, &top_ten[i].sc_monster); + &top_ten[i].sc_level, &monster); + top_ten[i].sc_monster = monster; } /* @@ -194,7 +196,7 @@ char monst; printf("Top Ten Adventurers:\nRank\tScore\tName\n"); for (scp = top_ten; scp <= &top_ten[9]; scp++) { if (scp->sc_score) { - printf("%d\t%d\t%s: %s on level %d", scp - top_ten + 1, + printf("%ld\t%d\t%s: %s on level %d", scp - top_ten + 1, scp->sc_score, scp->sc_name, reason[scp->sc_flags], scp->sc_level); if (scp->sc_flags == 0) {