Home » PLAYER'S HQ 1.13 » JA2 Complete Mods & Sequels » Stracciatella Project (Platform Independent JA2) » Crash when going into tactical screen on mine sectors
Re: Crash when going into tactical screen on mine sectors[message #250719] Fri, 30 April 2010 10:34 Go to previous messageGo to previous message
mgl is currently offline mgl

 
Messages:255
Registered:December 2007
Location: France
I haven't looked at this problem yet, but ...

From What I know, the NODEs are structures, objects, things like floor, roofs, boulders... lying on the tiles (gridnos) of the map. They shouldn't try to scan gridnos greater than WORLD_MAX.

I looked at its value last week for the GridNo bug and I think it's 25600.

I think it would be better if the caller does the "gridno < WORLD_MAX" test itself and calls the function "FloorAtGridNo()" only if the GridNo is valid. The spirit of your current fix is that the function "FloorAtGridNo()" answers that there's no floor on this invalid GridNo (map_idx), not that the GridNo is invalid. And it's not its job to tell that the gridno is invalid. The GridNo should have been acknowledged as invalid earlier in the caller's code and the caller shouldn't try to do anything with it.

Report message to a moderator

Master Sergeant
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bus Error @ Tactical screen
Next Topic: Bug: looking for enemies in adjacent sectors
Goto Forum:
  


Current Time: Sat Jan 11 01:49:46 GMT+2 2025

Total time taken to generate the page: 0.01035 seconds