diff options
author | Joost Peters | 2003-11-09 21:55:19 +0000 |
---|---|---|
committer | Joost Peters | 2003-11-09 21:55:19 +0000 |
commit | 357cfb8aeab8f3c6c0c5750c69c5ebae251291ae (patch) | |
tree | 45a094ab18bfed7869029057c0f2576eda47c1c9 | |
parent | b64c6fcbfc0898f8eb881f551e55d6695cc5dfd7 (diff) | |
download | scummvm-rg350-357cfb8aeab8f3c6c0c5750c69c5ebae251291ae.tar.gz scummvm-rg350-357cfb8aeab8f3c6c0c5750c69c5ebae251291ae.tar.bz2 scummvm-rg350-357cfb8aeab8f3c6c0c5750c69c5ebae251291ae.zip |
fix small leak
svn-id: r11231
-rw-r--r-- | queen/logic.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/queen/logic.cpp b/queen/logic.cpp index fd21ee9024..33d8020835 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -2348,6 +2348,7 @@ bool Logic::gameSave(uint16 slot, const char *desc) { byte *saveData = new byte[SAVEGAME_SIZE]; byte *ptr = saveData; memcpy(ptr, buf, 32); ptr += 32; + delete[] buf; WRITE_BE_UINT16(ptr, _settings.talkSpeed); ptr += 2; WRITE_BE_UINT16(ptr, _settings.musicVolume); ptr += 2; @@ -2378,7 +2379,7 @@ bool Logic::gameSave(uint16 slot, const char *desc) { for (j = 1; j <= _areaMax[i]; j++) _area[i][j].writeTo(ptr); - for (i = 0; i <= 85; i++) + for (i = 0; i < TALK_SELECTED_COUNT; i++) _talkSelected[i].writeTo(ptr); for (i = 1; i <= _numWalkOffs; i++) @@ -2446,7 +2447,7 @@ bool Logic::gameLoad(uint16 slot) { for (j = 1; j <= _areaMax[i]; j++) _area[i][j].readFrom(ptr); - for (i = 0; i <= 85; i++) + for (i = 0; i < TALK_SELECTED_COUNT; i++) _talkSelected[i].readFrom(ptr); for (i = 1; i <= _numWalkOffs; i++) |