[Scummvm-git-logs] scummvm master -> 1127bc46263e9ca43cc68990283ba593a0196109

AndywinXp noreply at scummvm.org
Tue Jan 9 22:28:21 UTC 2024


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:
1127bc4626 SWORD1: Fix endianness issue in speech handling


Commit: 1127bc46263e9ca43cc68990283ba593a0196109
    https://github.com/scummvm/scummvm/commit/1127bc46263e9ca43cc68990283ba593a0196109
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-01-09T23:28:15+01:00

Commit Message:
SWORD1: Fix endianness issue in speech handling

Thanks mikro for letting me know about this one,
this fixes #14826.

Changed paths:
    engines/sword1/sound.cpp


diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 317282e2b3d..16c01c1c06b 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -1204,7 +1204,7 @@ int32 Sound::getSpeechSize(byte *compData, uint32 compSize) {
 	if ((_cowMode == CowWave) || (_cowMode == CowDemo)) {
 		WaveHeader *waveHeader = (WaveHeader *)compData;
 
-		return (waveHeader->riffSize + 8) - sizeof(WaveHeader);
+		return (FROM_LE_32(waveHeader->riffSize) + 8) - sizeof(WaveHeader);
 	} else {
 		Common::MemoryReadStream memStream(compData, compSize);
 		Audio::RewindableAudioStream *stream = nullptr;




More information about the Scummvm-git-logs mailing list