diff options
-rw-r--r-- | engines/fullpipe/messages.cpp | 11 | ||||
-rw-r--r-- | engines/fullpipe/messages.h | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 9af4c59116..b0abe30504 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -234,6 +234,13 @@ ObjstateCommand::ObjstateCommand() { _objCommandName = 0; } +ObjstateCommand::ObjstateCommand(ObjstateCommand *src) : ExCommand(src) { + _value = src->_value; + _objCommandName = (char *)calloc(strlen(src->_objCommandName) + 1, 1); + + strncpy(_objCommandName, src->_objCommandName, strlen(src->_objCommandName)); +} + ObjstateCommand::~ObjstateCommand() { free(_objCommandName); } @@ -253,9 +260,7 @@ bool ObjstateCommand::load(MfcArchive &file) { } ObjstateCommand *ObjstateCommand::createClone() { - warning("STUB: ObjstateCommand::createClone()"); - - return this; + return new ObjstateCommand(this); } MessageQueue::MessageQueue() { diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 75345137b4..2e8a29c2cb 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -99,6 +99,7 @@ class ObjstateCommand : public ExCommand { public: ObjstateCommand(); + ObjstateCommand(ObjstateCommand *src); virtual ~ObjstateCommand(); virtual bool load(MfcArchive &file); |