Darwinbots Forum

Code center => Bugs and fixes => Topic started by: EricL on March 16, 2006, 02:13:34 PM

Title: Big Bot Body Shot Overflow
Post by: EricL on March 16, 2006, 02:13:34 PM
Got an overflow at line 97 of Shots.bas in newshot() when a bot with a really huge body shot a -6 shot.   Shots(a).value is defined as an Integer and is being assigned a value exceeding 2^15 in the varible 'val' which is a Long.  Curiously, there was a check for val>32000 lower down in the routine.  Moving in up to check before the assignment should take care of it (I havn't fully tested this - the bug is hard to repro, but so far so good).

New Shots_Module.bas is attached.

-E
Title: Big Bot Body Shot Overflow
Post by: Griz on March 17, 2006, 07:45:12 AM
version 2.37.6? version 2.4? both?
Title: Big Bot Body Shot Overflow
Post by: EricL on March 17, 2006, 10:10:37 AM
2.4A.  Haven't checked if it is in 2.37.6.