[Scummvm-git-logs] scummvm master -> 5fa3232bcf3c35b74049a341f3ecaefef8a68e28
criezy
criezy at scummvm.org
Thu Aug 5 11:55:36 UTC 2021
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:
5fa3232bcf AGS: Fix undefined behavior in initialization of AGSSnowRain
Commit: 5fa3232bcf3c35b74049a341f3ecaefef8a68e28
https://github.com/scummvm/scummvm/commit/5fa3232bcf3c35b74049a341f3ecaefef8a68e28
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-08-05T12:55:04+01:00
Commit Message:
AGS: Fix undefined behavior in initialization of AGSSnowRain
Due to the declaration order of the member variables, the _screenWidth
and _screenHeight where used before being initialized to initialize
the _snow and _rain variables. This could then lead to a division by
zero.
This fixes bug #12771: AGS King's Quest 3 VGA from IA crashes on startup
Changed paths:
engines/ags/plugins/ags_snow_rain/ags_snow_rain.h
diff --git a/engines/ags/plugins/ags_snow_rain/ags_snow_rain.h b/engines/ags/plugins/ags_snow_rain/ags_snow_rain.h
index 705d5ac36b..6d898c9ade 100644
--- a/engines/ags/plugins/ags_snow_rain/ags_snow_rain.h
+++ b/engines/ags/plugins/ags_snow_rain/ags_snow_rain.h
@@ -37,11 +37,11 @@ namespace AGSSnowRain {
class AGSSnowRain : public PluginBase {
SCRIPT_HASH(AGSSnowRain)
private:
- Weather _rain;
- Weather _snow;
int32 _screenWidth = 320;
int32 _screenHeight = 200;
int32 _screenColorDepth = 32;
+ Weather _rain;
+ Weather _snow;
private:
void srSetWindSpeed(ScriptMethodParams ¶ms);
More information about the Scummvm-git-logs
mailing list