[Scummvm-git-logs] scummvm master -> 723e9a2eb3a4d1418c40a70fc900abb447e0a5fe
rvanlaar
noreply at scummvm.org
Wed Aug 28 14:13:35 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:
723e9a2eb3 DIRECTOR: Resolve hitting eos for scriptcast reads
Commit: 723e9a2eb3a4d1418c40a70fc900abb447e0a5fe
https://github.com/scummvm/scummvm/commit/723e9a2eb3a4d1418c40a70fc900abb447e0a5fe
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2024-08-28T16:13:13+02:00
Commit Message:
DIRECTOR: Resolve hitting eos for scriptcast reads
Reading a script explicitely hits the End Of Stream by reading
one byte past the end. This triggers a buildbot warning that the
eos bool is set. The check is rewritten to check if stream pos
is the same stream size and thus not hitting the eos.
Changed paths:
engines/director/castmember/script.cpp
diff --git a/engines/director/castmember/script.cpp b/engines/director/castmember/script.cpp
index 7c190c2df90..38f56ad2d9d 100644
--- a/engines/director/castmember/script.cpp
+++ b/engines/director/castmember/script.cpp
@@ -57,8 +57,7 @@ ScriptCastMember::ScriptCastMember(Cast *cast, uint16 castId, Common::SeekableRe
debugC(3, kDebugLoading, "CASt: Script type: %s (%d), unk1: %d", scriptType2str(_scriptType), type, unk1);
- stream.readByte(); // There should be no more data
- assert(stream.eos());
+ assert(stream.pos() == stream.size()); // There should be no more data
} else {
warning("STUB: ScriptCastMember::ScriptCastMember(): Scripts not yet supported for version %d", version);
}
More information about the Scummvm-git-logs
mailing list