diff options
Diffstat (limited to 'engines/gob/save/saveload_v6.cpp')
-rw-r--r-- | engines/gob/save/saveload_v6.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/gob/save/saveload_v6.cpp b/engines/gob/save/saveload_v6.cpp index 455137aa6a..ac2a626521 100644 --- a/engines/gob/save/saveload_v6.cpp +++ b/engines/gob/save/saveload_v6.cpp @@ -134,7 +134,7 @@ bool SaveLoad_v6::GameHandler::load(int16 dataVar, int32 size, int32 offset) { return false; } - char *slotFile = _slotFile->build(slot); + Common::String slotFile = _slotFile->build(slot); SaveReader *reader = 0; SaveConverter_v6 converter(_vm, slotFile); @@ -159,8 +159,6 @@ bool SaveLoad_v6::GameHandler::load(int16 dataVar, int32 size, int32 offset) { return false; } - delete[] slotFile; - if (!reader->readPart(0, &info)) { delete reader; return false; @@ -233,15 +231,13 @@ bool SaveLoad_v6::GameHandler::save(int16 dataVar, int32 size, int32 offset) { return false; } - char *slotFile = _slotFile->build(slot); + Common::String slotFile = _slotFile->build(slot); SaveWriter writer(2, slot, slotFile); SavePartInfo info(kSlotNameLength, (uint32) _vm->getGameType(), 0, _vm->getEndianness(), varSize); SavePartVars vars(_vm, varSize); - delete[] slotFile; - // Write the description info.setDesc(_index + (slot * kSlotNameLength), kSlotNameLength); // Write all variables |