Vanilla-Conquer icon indicating copy to clipboard operation
Vanilla-Conquer copied to clipboard

[TD] Crash Bug in Commit e6dab4c (Oblelisk/AGT crew spawn location fix)

Open ChthonVII opened this issue 2 years ago • 2 comments

Commit e6dab4c contains a crash bug for TD. The added code uses a COORDINATE as an index into Map[]. But that's an array of CellClass's, so it should be indexed with a CELL. The value of a COORDINATE type is likely way past the end of the array. (Hence, crash.) The fix is to call Coord_Cell() so we can pass a CELL value to Map[].

(Not an issue in RA because there's a special override of [] to handle when it's passed a COORDINATE that calls Coord_Cell() for you. Though perhaps it should be changed too anyway as a bad coding practice?)

ChthonVII avatar Sep 05 '22 04:09 ChthonVII

Thanks for pointing this out. VanillaTD builds from the past few months were prone to crashing. I applied this one line fix and VanillaTD now runs for hours without any problems.

Gerwin2k avatar Sep 14 '22 22:09 Gerwin2k

This might explain why when the AI sells everything off some minigunners spawns in the map borders in the DS port.

giulianobelinassi avatar Sep 16 '22 18:09 giulianobelinassi