[Scummvm-cvs-logs] SF.net SVN: scummvm: [26292] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sat Mar 24 17:36:13 CET 2007
Revision: 26292
http://scummvm.svn.sourceforge.net/scummvm/?rev=26292&view=rev
Author: peres001
Date: 2007-03-24 09:36:13 -0700 (Sat, 24 Mar 2007)
Log Message:
-----------
- fixed regression bug: one free/delete mismatch
- added needed virtual destructors to structs
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/commands.cpp
scummvm/trunk/engines/parallaction/commands.h
scummvm/trunk/engines/parallaction/defs.h
scummvm/trunk/engines/parallaction/location.cpp
Modified: scummvm/trunk/engines/parallaction/commands.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/commands.cpp 2007-03-24 00:57:48 UTC (rev 26291)
+++ scummvm/trunk/engines/parallaction/commands.cpp 2007-03-24 16:36:13 UTC (rev 26292)
@@ -200,7 +200,7 @@
while (cmd) {
Command *v4 = (Command*)cmd->_next;
- if (cmd->_id == 6) delete cmd->u._zone; // open
+ if (cmd->_id == CMD_LOCATION) free(cmd->u._string);
delete cmd;
cmd = v4;
Modified: scummvm/trunk/engines/parallaction/commands.h
===================================================================
--- scummvm/trunk/engines/parallaction/commands.h 2007-03-24 00:57:48 UTC (rev 26291)
+++ scummvm/trunk/engines/parallaction/commands.h 2007-03-24 16:36:13 UTC (rev 26292)
@@ -50,6 +50,9 @@
CommandData() {
_flags = 0;
}
+
+ ~CommandData() {
+ }
};
struct Command : public Node {
@@ -63,6 +66,10 @@
_flagsOn = 0;
_flagsOff = 0;
}
+
+ ~Command() {
+
+ }
};
} // namespace Parallaction
Modified: scummvm/trunk/engines/parallaction/defs.h
===================================================================
--- scummvm/trunk/engines/parallaction/defs.h 2007-03-24 00:57:48 UTC (rev 26291)
+++ scummvm/trunk/engines/parallaction/defs.h 2007-03-24 16:36:13 UTC (rev 26292)
@@ -41,6 +41,10 @@
_prev = NULL;
_next = NULL;
}
+
+ virtual ~Node() {
+
+ }
};
struct WalkNode : public Node {
Modified: scummvm/trunk/engines/parallaction/location.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/location.cpp 2007-03-24 00:57:48 UTC (rev 26291)
+++ scummvm/trunk/engines/parallaction/location.cpp 2007-03-24 16:36:13 UTC (rev 26292)
@@ -196,14 +196,18 @@
helperNode._prev = helperNode._next = NULL;
_vm->freeZones(_zones._next);
freeNodeList(_zones._next);
- memcpy(&_zones, &helperNode, sizeof(Node));
+ _zones._next = helperNode._next;
+ _zones._prev = helperNode._prev;
+// memcpy(&_zones, &helperNode, sizeof(Node));
debugC(7, kDebugLocation, "freeLocation: zones freed");
helperNode._prev = helperNode._next = NULL;
_vm->freeZones(_animations._next);
_vm->freeAnimations();
freeNodeList(_animations._next);
- memcpy(&_animations, &helperNode, sizeof(Node));
+ _animations._next = helperNode._next;
+ _animations._prev = helperNode._prev;
+// memcpy(&_animations, &helperNode, sizeof(Node));
debugC(7, kDebugLocation, "freeLocation: animations freed");
if (_vm->_location._comment) {
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