[Scummvm-git-logs] scummvm master -> 398b8d4dba82c925d344bba319640e37f5aeccfd

digitall 547637+digitall at users.noreply.github.com
Thu Sep 16 20:08:38 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:
398b8d4dba GROOVIE: Fix GCC Compiler Warnings


Commit: 398b8d4dba82c925d344bba319640e37f5aeccfd
    https://github.com/scummvm/scummvm/commit/398b8d4dba82c925d344bba319640e37f5aeccfd
Author: D G Turner (digitall at scummvm.org)
Date: 2021-09-16T21:07:59+01:00

Commit Message:
GROOVIE: Fix GCC Compiler Warnings

Changed paths:
    engines/groovie/logic/tlcgame.cpp


diff --git a/engines/groovie/logic/tlcgame.cpp b/engines/groovie/logic/tlcgame.cpp
index 693b493a76..55b3a8751b 100644
--- a/engines/groovie/logic/tlcgame.cpp
+++ b/engines/groovie/logic/tlcgame.cpp
@@ -30,6 +30,7 @@
 #include "common/file.h"
 #include "common/macresman.h"
 #include "common/translation.h"
+#include "common/util.h"
 
 namespace Groovie {
 
@@ -189,7 +190,7 @@ void TlcGame::regionsLoad() {
 
 	// Get length of question name from variables
 	int nameLen = _scriptVariables[0x1B] * 10 + _scriptVariables[0x1C];
-	if (nameLen >= sizeof(TlcRegionsHeader::name)) {
+	if (nameLen >= ARRAYSIZE(TlcRegionsHeader::name)) {
 		error("TLC:RegionsLoad: Name to long for loadRegions!");
 	}
 
@@ -349,7 +350,7 @@ void TlcGame::epInit() {
 	delete epaidbfile;
 
 	// Initialize register 0x01 with values from database
-	if (_epEpisodeIdx >= sizeof(kTlcEpQuestToPlay)) {
+	if (_epEpisodeIdx >= ARRAYSIZE(kTlcEpQuestToPlay)) {
 		error("TLC:EpInit: EposdeIdx out of range for init data of reg0x01");
 	}
 	setScriptVar(2, kTlcEpQuestToPlay[_epEpisodeIdx] + 0x30);




More information about the Scummvm-git-logs mailing list