[Scummvm-git-logs] scummvm master -> 0006cf9aea48d5b2ecb7e0dbfa5b58fb97651462
criezy
noreply at scummvm.org
Sun Dec 4 21:19:34 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0006cf9aea AGS: Fix a new[]/delete[] mismatch in main_game_file.cpp
Commit: 0006cf9aea48d5b2ecb7e0dbfa5b58fb97651462
https://github.com/scummvm/scummvm/commit/0006cf9aea48d5b2ecb7e0dbfa5b58fb97651462
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-12-04T21:19:22Z
Commit Message:
AGS: Fix a new[]/delete[] mismatch in main_game_file.cpp
Changed paths:
engines/ags/shared/game/main_game_file.cpp
diff --git a/engines/ags/shared/game/main_game_file.cpp b/engines/ags/shared/game/main_game_file.cpp
index 9ddc5c33d24..c4db80d06e8 100644
--- a/engines/ags/shared/game/main_game_file.cpp
+++ b/engines/ags/shared/game/main_game_file.cpp
@@ -282,7 +282,7 @@ void ReadDialogs(std::vector<DialogTopic> &dialog,
old_dialog_src.resize(dlg_count);
for (int i = 0; i < dlg_count; ++i) {
// NOTE: originally this was read into dialog[i].optionscripts
- old_dialog_scripts[i].reset(new unsigned char[dialog[i].codesize]);
+ old_dialog_scripts[i].reset(Common::SharedPtr<unsigned char>(new unsigned char[dialog[i].codesize], Common::ArrayDeleter<unsigned char>()));
in->Read(old_dialog_scripts[i].get(), dialog[i].codesize);
// Encrypted text script
More information about the Scummvm-git-logs
mailing list