[Scummvm-git-logs] scummvm master -> 4da3b518b51134a18d4920ab77999c703e6f6a3c
bluegr
noreply at scummvm.org
Sun Feb 23 15:56:20 UTC 2025
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:
4da3b518b5 AGS: Avoid stack frame size warning in AGS3::unload_game
Commit: 4da3b518b51134a18d4920ab77999c703e6f6a3c
https://github.com/scummvm/scummvm/commit/4da3b518b51134a18d4920ab77999c703e6f6a3c
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-02-23T17:56:17+02:00
Commit Message:
AGS: Avoid stack frame size warning in AGS3::unload_game
Instead of allocating the GameState and GameSetupStruct variables on
stack and erase the heap version, deallocate the old ones and reallocate
new ones.
Changed paths:
engines/ags/engine/ac/game.cpp
diff --git a/engines/ags/engine/ac/game.cpp b/engines/ags/engine/ac/game.cpp
index d0a47f4d5ae..e80d693f417 100644
--- a/engines/ags/engine/ac/game.cpp
+++ b/engines/ags/engine/ac/game.cpp
@@ -400,8 +400,10 @@ void unload_game() {
_GP(thisroom).Free();
// Free game state and game struct
- _GP(play) = GameState();
- _GP(game) = GameSetupStruct();
+ delete _G(play);
+ _G(play) = new GameState();
+ delete _G(game);
+ _G(game) = new GameSetupStruct();
// Reset all resource caches
// IMPORTANT: this is hard reset, including locked items
More information about the Scummvm-git-logs
mailing list