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 #250706] Fri, 30 April 2010 01:22 Go to previous messageGo to previous message
bbun is currently offline bbun

 
Messages:74
Registered:April 2004
Location: Amsterdam
As I expected, simply validating the range of map_idx solves this. Problem is I don't know what's the maximum. I took the value that crashed my game (25601) to quickfix my version.

What's the theoretical range of this? (equals amount of tiles on a map I assume?)

Temporary fix:

bool FloorAtGridNo(UINT32 const map_idx)
{
	if (map_idx >= 25601) return false;
	for (LEVELNODE const* i = gpWorldLevelData[map_idx].pLandHead; i;)
	{
		if (i->usIndex == NO_TILE) continue;


I wonder what's at the basis of this invalid index...

Report message to a moderator

Corporal
 
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 02:09:21 GMT+2 2025

Total time taken to generate the page: 0.01116 seconds