[Scummvm-cvs-logs] scummvm master -> b247515c587e1b9da4765b7108ce2ae0321f13c5

eriktorbjorn eriktorbjorn at telia.com
Mon Jan 12 06:49:47 CET 2015


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:
b247515c58 ZVISION: Check eos() after reading from stream, not before


Commit: b247515c587e1b9da4765b7108ce2ae0321f13c5
    https://github.com/scummvm/scummvm/commit/b247515c587e1b9da4765b7108ce2ae0321f13c5
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-01-12T06:47:12+01:00

Commit Message:
ZVISION: Check eos() after reading from stream, not before

This fixes stray character in ZGI game over screen, when it reads
an empty line of text.

Changed paths:
    engines/zvision/text/text.cpp



diff --git a/engines/zvision/text/text.cpp b/engines/zvision/text/text.cpp
index a5ed044..e0501ae 100644
--- a/engines/zvision/text/text.cpp
+++ b/engines/zvision/text/text.cpp
@@ -490,8 +490,10 @@ void TextRenderer::drawTxtInOneLine(const Common::String &text, Graphics::Surfac
 Common::String readWideLine(Common::SeekableReadStream &stream) {
 	Common::String asciiString;
 
-	while (!stream.eos()) {
+	while (true) {
 		uint32 value = stream.readUint16LE();
+		if (stream.eos())
+			break;
 		// Check for CRLF
 		if (value == 0x0A0D) {
 			// Read in the extra NULL char






More information about the Scummvm-git-logs mailing list