Path: utzoo!utgpu!watmath!clyde!att!pacbell!ames!xanth!nic.MR.NET!srcsip!meier From: meier@src.honeywell.COM (Christopher M. Meier) Newsgroups: comp.sources.games.bugs Subject: Re: Sokoban restart bug & fix Message-ID: <14502@srcsip.UUCP> Date: 8 Jan 89 20:22:09 GMT References: <1295@atari.UUCP> Reply-To: meier@io.UUCP (Christopher M. Meier) Organization: Honeywell Systems & Research Center, Camden, MN Lines: 26 In article <1295@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes: +I didn't need the patch which appeared here for Sokoban relating to +cbreak mode; I don't know why, but my version works fine (on 4.2BSD). +However... me either... +... it uses a variable before setting it. +Here's the fix, to file score.c: + +136c136 +< for( i = 0; (i < scoreentries) && (! found); i++) +--- +> for( found = i = 0; (i < scoreentries) && (! found); i++) Below is the source surrounding the above code, found *is* set before using. Is there more than one version of this source floating around? finduser() { short i, found = 0; for( i = 0; (i < scoreentries) && (! found); i++) found = (strcmp( scoretable[i].user, username) == 0); return( (found) ? i-1 : -1); }