From fortune!hpda!hplabs!tektronix!uw-beaver!cornell!vax135!houxm!mhuxt!mhuxr!mhuxn!mhuxm!sftig!sftri!sfmag!eagle!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!mcvax!aeb Thu Apr 25 05:33:27 1985 Relay-Version: version B 2.10.2 9/18/84; site wdl1.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site mcvax.UUCP Path: wdl1!fortune!hpda!hplabs!tektronix!uw-beaver!cornell!vax135!houxm!mhuxt!mhuxr!mhuxn!mhuxm!sftig!sftri!sfmag!eagle!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!mcvax!aeb From: aeb@mcvax.UUCP (Andries Brouwer) Newsgroups: net.sources.games,net.games.hack Subject: Re: Hack.1.0.2 bug fix. Message-ID: <631@mcvax.UUCP> Date: 25 Apr 85 13:33:27 GMT Article-I.D.: mcvax.631 Posted: Thu Apr 25 05:33:27 1985 Date-Received: 2 May 85 16:17:35 GMT References: <1637@psuvax1.UUCP> Reply-To: aeb@mcvax.UUCP (Andries Brouwer) Followup-To: net.games.hack Distribution: net Organization: CWI, Amsterdam Lines: 30 In article <1637@psuvax1.UUCP> kopper@psuvax1.UUCP writes: > >There is a bug in the '/' command. Try executing it about 16+ times >on some valid item. Hack should at that point run out of file descriptors. >The fix is to add a fclose(fp) in hack.pager.c (enclosed is a context diff). > >*** old.hack.pager.c Fri Apr 19 10:34:09 1985 >--- hack.pager.c Fri Apr 19 21:01:53 1985 >*************** >*** 44,49 > if(readchar() == 'y') > page_more(fp,1); /* does fclose() */ > } > return(0); > } > pline("I've never heard of such things."); > >--- 44,50 ----- > if(readchar() == 'y') > page_more(fp,1); /* does fclose() */ > } >+ (void) fclose(fp); /* fixed... kdx */ > return(0); > } > pline("I've never heard of such things."); This fix is more important than you might think - if you run out of file descriptors and seven hours later finish the game with the score of the century you'll get the reply "Cannot open record file". So, this fix should really be installed.