diff --git a/src/cc/rogue/mach_dep.c b/src/cc/rogue/mach_dep.c index 7f1af9c67..34e502816 100644 --- a/src/cc/rogue/mach_dep.c +++ b/src/cc/rogue/mach_dep.c @@ -403,7 +403,8 @@ over: printf("The score file is very busy. Do you want to wait longer\n"); printf("for it to become free so your score can get posted?\n"); printf("If so, type \"y\"\n"); - (void) fgets(prbuf, MAXSTR, stdin); + if (fgets(prbuf, MAXSTR, stdin) != 0 ) + ; if (prbuf[0] == 'y') for (;;) { diff --git a/src/cc/rogue/rip.c b/src/cc/rogue/rip.c index 6f2793615..dc22566e9 100644 --- a/src/cc/rogue/rip.c +++ b/src/cc/rogue/rip.c @@ -179,7 +179,8 @@ score(int amount, int flags, char monst) else if (prflags == 2) { fflush(stdout); - (void) fgets(prbuf,10,stdin); + if ( fgets(prbuf,10,stdin) != 0 ) + fprintf(stderr,"fgets error\n"); if (prbuf[0] == 'd') { for (sc2 = scp; sc2 < endp - 1; sc2++) @@ -270,7 +271,8 @@ death(char monst) score(purse, amulet ? 3 : 0, monst); printf("[Press return to continue]"); fflush(stdout); - (void) fgets(prbuf,10,stdin); + if ( fgets(prbuf,10,stdin) != 0 ) + ; my_exit(0); } diff --git a/src/cc/rogue/rogue.c b/src/cc/rogue/rogue.c index d463ddc49..a496426dd 100644 --- a/src/cc/rogue/rogue.c +++ b/src/cc/rogue/rogue.c @@ -147,7 +147,6 @@ int32_t rogue_replay(uint64_t seed) if ( (fp= fopen("checkfile","wb")) != 0 ) { save_file(fp,0); - fclose(fp); if ( 0 && (fp= fopen("checkfile","rb")) != 0 ) { for (i=0; i<0x150; i++)