[Scummvm-cvs-logs] SF.net SVN: scummvm: [32635] scummvm/trunk/engines/drascula/drascula.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Jun 9 16:36:58 CEST 2008
Revision: 32635
http://scummvm.svn.sourceforge.net/scummvm/?rev=32635&view=rev
Author: thebluegr
Date: 2008-06-09 07:36:58 -0700 (Mon, 09 Jun 2008)
Log Message:
-----------
Properly initialize and destroy the different arrays read from drascula.dat. Also, fixed a crash that occurred from the last commit
Modified Paths:
--------------
scummvm/trunk/engines/drascula/drascula.cpp
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2008-06-09 14:23:04 UTC (rev 32634)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2008-06-09 14:36:58 UTC (rev 32635)
@@ -72,6 +72,20 @@
delete _rnd;
free(_charMap);
+ free(_itemLocations);
+ free(_polX);
+ free(_polY);
+ free(_verbBarX);
+ free(_x1d_menu);
+ free(_y1d_menu);
+ free(_frameX);
+ free(_candleX);
+ free(_candleY);
+ free(_pianistX);
+ free(_drunkX);
+ free(_roomPreUpdates);
+ free(_roomUpdates);
+ free(_roomActions);
freeTexts(_text);
freeTexts(_textd);
freeTexts(_textb);
@@ -118,6 +132,20 @@
}
_charMap = 0;
+ _itemLocations = 0;
+ _polX = 0;
+ _polY = 0;
+ _verbBarX = 0;
+ _x1d_menu = 0;
+ _y1d_menu = 0;
+ _frameX = 0;
+ _candleX = 0;
+ _candleY = 0;
+ _pianistX = 0;
+ _drunkX = 0;
+ _roomPreUpdates = 0;
+ _roomUpdates = 0;
+ _roomActions = 0;
_text = 0;
_textd = 0;
_textb = 0;
@@ -930,7 +958,7 @@
res[lang] = (char **)malloc(sizeof(char *) * numTexts);
res[lang][0] = pos = (char *)malloc(entryLen);
- res[lang][0] = pos + DATAALIGNMENT;
+ res[lang][0] = pos = pos + DATAALIGNMENT;
in.read(res[lang][0], entryLen);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list