[Scummvm-git-logs] scummvm master -> 87b1f858e5eddf3028ee8958074723c038fbdd69

a-yyg 76591232+a-yyg at users.noreply.github.com
Fri Aug 13 21:05:32 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:
87b1f858e5 SAGA2: Add check for out-of-range access in audioEnvironmentCheck


Commit: 87b1f858e5eddf3028ee8958074723c038fbdd69
    https://github.com/scummvm/scummvm/commit/87b1f858e5eddf3028ee8958074723c038fbdd69
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-08-14T06:04:43+09:00

Commit Message:
SAGA2: Add check for out-of-range access in audioEnvironmentCheck

Changed paths:
    engines/saga2/beegee.cpp


diff --git a/engines/saga2/beegee.cpp b/engines/saga2/beegee.cpp
index a3359068ae..d6bc222c89 100644
--- a/engines/saga2/beegee.cpp
+++ b/engines/saga2/beegee.cpp
@@ -357,7 +357,7 @@ void audioEnvironmentCheck(void) {
 
 	uint32 delta = gameTime - lastGameTime;
 	lastGameTime = gameTime;
-	if (currentTheme) {
+	if (currentTheme > 0 && currentTheme <= kAudioTerrainLIMIT) {
 		elapsedGameTime += delta;
 		if (elapsedGameTime > checkGameTime) {
 			int i;
@@ -384,7 +384,8 @@ void audioEnvironmentCheck(void) {
 			}
 
 		}
-	}
+	} else if (currentTheme)
+		warning("currentTheme out of range: %d", currentTheme);
 
 }
 




More information about the Scummvm-git-logs mailing list