aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/save/saveload_v6.cpp
diff options
context:
space:
mode:
authorMax Horn2009-05-31 17:00:38 +0000
committerMax Horn2009-05-31 17:00:38 +0000
commite072532458b177c281302957c6eda318914e52c2 (patch)
treee4cee65571d3fe4311e5ec730e7ee8a3d1da60ea /engines/gob/save/saveload_v6.cpp
parent78a887490357393b420e288a3318d94497e59293 (diff)
downloadscummvm-rg350-e072532458b177c281302957c6eda318914e52c2.tar.gz
scummvm-rg350-e072532458b177c281302957c6eda318914e52c2.tar.bz2
scummvm-rg350-e072532458b177c281302957c6eda318914e52c2.zip
GOB: Got rid of last traces of strdupcpy and strdupcat
svn-id: r41079
Diffstat (limited to 'engines/gob/save/saveload_v6.cpp')
-rw-r--r--engines/gob/save/saveload_v6.cpp8
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