[Scummvm-git-logs] scummvm master -> 986c84fb729b83174b562a89b2b65b1b531c236b

sev- sev at scummvm.org
Thu Jul 29 10:02:47 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:
986c84fb72 DIRECTOR: Avoid adding \0s to strings


Commit: 986c84fb729b83174b562a89b2b65b1b531c236b
    https://github.com/scummvm/scummvm/commit/986c84fb729b83174b562a89b2b65b1b531c236b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-29T12:02:22+02:00

Commit Message:
DIRECTOR: Avoid adding \0s to strings

Changed paths:
    engines/director/archive.cpp


diff --git a/engines/director/archive.cpp b/engines/director/archive.cpp
index 09794a7e88..64f58be255 100644
--- a/engines/director/archive.cpp
+++ b/engines/director/archive.cpp
@@ -340,7 +340,10 @@ bool RIFFArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
 
 		if (nameSize) {
 			for (uint8 i = 0; i < nameSize; i++) {
-				name += stream->readByte();
+				byte b = stream->readByte();
+
+				if (b)
+					name += b;
 			}
 		}
 




More information about the Scummvm-git-logs mailing list