- Improved the dirty bugfix "Out of memory bug", when loading a savegame with the wrong "data files" (original bugfix: revision: 4532)

o The problem is the wrong (too height) number passed to the resize() method which leads to "out of memory exceptions"

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4683 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-10-04 16:51:35 +00:00
parent 262b05817a
commit b0697174bc
+1 -1
View File
@@ -2404,7 +2404,7 @@ BOOLEAN OBJECTTYPE::Load( HWFILE hFile )
// The size can get any huge value, if we are using wrong items.xml on the savegame
// In that case, the "objectStack.resize(size) consumes ALL the memory on the system and then the game crashes because of not enough free memory!!!!
// When returning FALSE well tell there is something wrong and we can't load the savegame
if (size < 0 || size > 1000)
if (size < 0 || size >= 512)
{
return(FALSE);
}