[Scummvm-git-logs] scummvm master -> 547993d966f14907e16130deef7b4075a68924c1

AndywinXp noreply at scummvm.org
Sat Feb 26 11:03:55 UTC 2022


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:
547993d966 SCUMM: DiMUSE: Add check to _ftSpeechFilename


Commit: 547993d966f14907e16130deef7b4075a68924c1
    https://github.com/scummvm/scummvm/commit/547993d966f14907e16130deef7b4075a68924c1
Author: Andrea Boscarino (andywinxp at gmail.com)
Date: 2022-02-26T12:03:53+01:00

Commit Message:
SCUMM: DiMUSE: Add check to _ftSpeechFilename

Without this check an user could have saved at the very beginning of the game (where no speech file was already loaded), reloaded the same savegame, and consequently crash ScummVM (which was, in turn, trying to open a speech file with an empty filename). Thanks criezy for finding this.

Changed paths:
    engines/scumm/imuse_digi/dimuse_files.cpp


diff --git a/engines/scumm/imuse_digi/dimuse_files.cpp b/engines/scumm/imuse_digi/dimuse_files.cpp
index 3b2754fd8c2..0a466736d06 100644
--- a/engines/scumm/imuse_digi/dimuse_files.cpp
+++ b/engines/scumm/imuse_digi/dimuse_files.cpp
@@ -89,7 +89,8 @@ void IMuseDigiFilesHandler::saveLoad(Common::Serializer &ser) {
 			ser.syncAsSint32LE(_ftSpeechFileSize, VER(103));
 			ser.syncAsSint32LE(_ftSpeechSubFileOffset, VER(103));
 			ser.syncArray(_ftSpeechFilename, sizeof(_ftSpeechFilename), Common::Serializer::SByte, VER(103));
-			_ftSpeechFile = _vm->_sound->restoreDiMUSESpeechFile(_ftSpeechFilename);
+			if (strlen(_ftSpeechFilename))
+				_ftSpeechFile = _vm->_sound->restoreDiMUSESpeechFile(_ftSpeechFilename);
 		}
 	}
 }




More information about the Scummvm-git-logs mailing list