From 4d11069d9c62d2a46df473098199ed002d05afa5 Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Sat, 11 Aug 2012 20:58:24 +0000 Subject: [PATCH] arogue5: update the score list before prompting to exit. --- arogue5/rip.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/arogue5/rip.c b/arogue5/rip.c index dca1c39..a043a10 100644 --- a/arogue5/rip.c +++ b/arogue5/rip.c @@ -472,6 +472,13 @@ short monst; } } + fseek(outf, 0L, 0); + /* + * Update the list file + */ + scoreout(top_ten, outf); + fclose(outf); + /* * SCOREIT -- rogue -s option. Never started curses if this option. * UPDATE -- network scoring update. Never started curses if this option. @@ -557,19 +564,14 @@ short monst; else printf("\n"); } } - if ((flags != SCOREIT) && (flags != UPDATE)) { - printf("\n[Press return to exit]"); - fflush(stdout); - fgets(prbuf,80,stdin); - } /* if (prflags == EDITSCORE) endwin(); */ /* End editing windowing */ } - fseek(outf, 0L, 0); - /* - * Update the list file - */ - scoreout(top_ten, outf); - fclose(outf); + + if ((flags != SCOREIT) && (flags != UPDATE)) { + printf("\n[Press return to exit]"); + fflush(stdout); + fgets(prbuf,80,stdin); + } } void writelog(unsigned long amount, int flags, short monst) {