From e072532458b177c281302957c6eda318914e52c2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 31 May 2009 17:00:38 +0000 Subject: GOB: Got rid of last traces of strdupcpy and strdupcat svn-id: r41079 --- engines/gob/save/saveload_v6.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'engines/gob/save/saveload_v6.cpp') 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 -- cgit v1.2.3