Code center > Bugs and fixes

Big Bot Body Shot Overflow

(1/1)

EricL:
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

Griz:
version 2.37.6? version 2.4? both?

EricL:
2.4A.  Haven't checked if it is in 2.37.6.

Navigation

[0] Message Index

Go to full version