Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!mcsun!tuvie!rcvie!se_micha From: se_micha@rcvie@tuvie.uucp (Niklas Michalopulos) Newsgroups: comp.sources.games.bugs Subject: Re: Galactic Bloodshed Message-ID: <932@rcsw11.rcvie@tuvie.uucp> Date: 3 Aug 90 10:22:48 GMT References: <1990Aug2.013854.26939@sun.soe.clarkson.edu> Sender: rcvie!se_micha (Niklas Michalopulos) Reply-To: se_micha@rcsw11.UUCP (Niklas Michalopulos) Organization: Alcatel Austria - Elin Research Center, Vienna Lines: 28 In article <1990Aug2.013854.26939@sun.soe.clarkson.edu> varneyml@clutx.clarkson.edu writes: > >I've been having a problem with Galactic Bloodshed... within 3 turns >of the game starting, all the stars go nova. Some the first turn, more >the second, and the rest usually on the third. Someone told me that >there was a bug in one of the functions.... does anyone know what the error >is and how to fix it? The bug is in function fix_stability in file doturn.c: Somewhere 'round the end of the function a random number is calculated (rather complex nested int_rands) and this number is added to the stability. Then there is a check if the stability is < 0, BUT it is UNSIGNED!!! So quite often the stability becomes a number > 65000, which clearly indicates a nova in the next turn... >Thanx anyone... Have fun! bye, Nik -- +--------------------------------------------------+ + disclaimer: My opinions are a congenital defect, + + what is your excuse ? + +--------------------------------------------------+