[Scummvm-git-logs] scummvm master -> 04585b60ec8ffc406febd09a45c7512057be3fa8

eriktorbjorn eriktorbjorn at telia.com
Sat Jul 21 09:23:35 CEST 2018


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:
04585b60ec AGOS: Silence GCC 8 warning


Commit: 04585b60ec8ffc406febd09a45c7512057be3fa8
    https://github.com/scummvm/scummvm/commit/04585b60ec8ffc406febd09a45c7512057be3fa8
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2018-07-21T09:23:06+02:00

Commit Message:
AGOS: Silence GCC 8 warning

Since 'filename' is 'baseName', plus a file extension, make the
'filename' buffer larger than the 'baseName' buffer. Even though
this almost certainly means that the 'filename' buffer is now
quite a bit larger than it needs to be, I don't think there's any
reason to quibble about it.

Changed paths:
    engines/agos/animation.cpp


diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp
index 123e580..e374c14 100644
--- a/engines/agos/animation.cpp
+++ b/engines/agos/animation.cpp
@@ -519,7 +519,7 @@ bool MoviePlayerSMK::processFrame() {
 
 MoviePlayer *makeMoviePlayer(AGOSEngine_Feeble *vm, const char *name) {
 	char baseName[40];
-	char filename[20];
+	char filename[45];
 
 	int baseLen = strlen(name) - 4;
 	memset(baseName, 0, sizeof(baseName));
@@ -528,7 +528,7 @@ MoviePlayer *makeMoviePlayer(AGOSEngine_Feeble *vm, const char *name) {
 	if (vm->getLanguage() == Common::DE_DEU && baseLen >= 8) {
 		// Check short filename to work around
 		// bug in a German Windows 2CD version.
-		char shortName[20];
+		char shortName[10];
 		memset(shortName, 0, sizeof(shortName));
 		memcpy(shortName, baseName, 6);
 





More information about the Scummvm-git-logs mailing list