# HG changeset patch # User darkvater # Date 1104797278 0 # Node ID f3d9b97fff06d2e3c4a7715f02738b48008ccee6 # Parent c10172705487078348199ac466bfeb75a8f41bf4 (svn r1365) -Fix: very, very nasty buffer overflow bug introduced with replace vehicles. You CANNOT access the i[255] of an array that only has 255 elements! I will kick the next person that does that so hard...goddammit (I only noticed it because it screwed up my console in the debug build and took me at least an hour to fix) diff -r c10172705487 -r f3d9b97fff06 misc.c --- a/misc.c Mon Jan 03 22:16:02 2005 +0000 +++ b/misc.c Tue Jan 04 00:07:58 2005 +0000 @@ -185,9 +185,9 @@ { // Initialize the autoreplace array. Needs to be cleared between each game int i; - for (i = 0; i < 256; i++) { + for (i = 0; i < lengthof(_autoreplace_array); i++) _autoreplace_array[i] = i; - } + AddTypeToEngines(); // make sure all engines have a type SetObjectToPlace(1, 0, 0, 0);