Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!bionet!apple!bloom-beacon!bu-cs!adb From: adb@bu-cs.BU.EDU (Adam Bryant) Newsgroups: comp.sources.games.bugs Subject: Re: Ularn bug -- selling the same gem more than once Message-ID: <34458@bu-cs.BU.EDU> Date: 10 Jul 89 18:01:53 GMT References: <114443@sun.Eng.Sun.COM> Reply-To: adb@bu-cs.bu.edu (Adam Bryant) Followup-To: comp.sources.games.bugs Organization: Boston University Distributed Systems Group Lines: 16 In article <114443@sun.Eng.Sun.COM> kcr%rushforth@Sun.COM (Kevin Rushforth) writes: >There is a bug in larn that was carried over into Ularn which allows >one to sell a gem an unlimited number of times. To reproduce this >Following is a fix for this bug. It is a patch that should be applied >to store.c -- this patch works for larn as well as Ularn. > You really don't need to create the extra loop to fix that bug. The array gemvalue is declared as a static array and therefore saves its value between calls to the function. Simply remove the word 'static' from the declaration of gemvalue and the problem will be solved. adam