mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- 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:
+1
-1
@@ -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
|
// 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!!!!
|
// 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
|
// 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);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user