[Scummvm-git-logs] scummvm master -> 9c208bc60f3784709498285b6f83f771fa1a81f2

djsrv dservilla at gmail.com
Sun Jul 4 07:02:41 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:
9c208bc60f DIRECTOR: Don't backtrack if at end of stream


Commit: 9c208bc60f3784709498285b6f83f771fa1a81f2
    https://github.com/scummvm/scummvm/commit/9c208bc60f3784709498285b6f83f771fa1a81f2
Author: djsrv (dservilla at gmail.com)
Date: 2021-07-04T03:02:03-04:00

Commit Message:
DIRECTOR: Don't backtrack if at end of stream

Changed paths:
    engines/director/fonts.cpp


diff --git a/engines/director/fonts.cpp b/engines/director/fonts.cpp
index cee5d9fe4d..500f45853a 100644
--- a/engines/director/fonts.cpp
+++ b/engines/director/fonts.cpp
@@ -122,14 +122,18 @@ FXmpToken readFXmpToken(Common::SeekableReadStreamEndian &stream) {
 			res.str += ch;
 			ch = stream.readByte();
 		} while (!stream.eos() && Common::isAlpha(ch));
-		stream.seek(-1, SEEK_CUR);
+		if (!stream.eos()) {
+			stream.seek(-1, SEEK_CUR);
+		}
 	} else if (Common::isDigit(ch)) {
 		res.type = FXMP_TOKEN_INT;
 		do {
 			res.str += ch;
 			ch = stream.readByte();
 		} while (!stream.eos() && Common::isDigit(ch));
-		stream.seek(-1, SEEK_CUR);
+		if (!stream.eos()) {
+			stream.seek(-1, SEEK_CUR);
+		}
 	} else if (ch == '"') {
 		res.type = FXMP_TOKEN_STRING;
 		ch = stream.readByte();




More information about the Scummvm-git-logs mailing list