Author Topic: Big Bot Body Shot Overflow  (Read 2558 times)

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Big Bot Body Shot Overflow
« 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
Many beers....

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
Big Bot Body Shot Overflow
« Reply #1 on: March 17, 2006, 07:45:12 AM »
version 2.37.6? version 2.4? both?
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Big Bot Body Shot Overflow
« Reply #2 on: March 17, 2006, 10:10:37 AM »
2.4A.  Haven't checked if it is in 2.37.6.
Many beers....