diff options
author | Torbjörn Andersson | 2015-01-12 06:47:12 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2015-01-12 06:47:12 +0100 |
commit | b247515c587e1b9da4765b7108ce2ae0321f13c5 (patch) | |
tree | 940a81b927ccba0e6148d0a53d8f7acd2c9f6d10 /engines/zvision | |
parent | 3f4c924c9e6b26260e06d385a71b874d32371903 (diff) | |
download | scummvm-rg350-b247515c587e1b9da4765b7108ce2ae0321f13c5.tar.gz scummvm-rg350-b247515c587e1b9da4765b7108ce2ae0321f13c5.tar.bz2 scummvm-rg350-b247515c587e1b9da4765b7108ce2ae0321f13c5.zip |
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.
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/text/text.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/zvision/text/text.cpp b/engines/zvision/text/text.cpp index a5ed044424..e0501ae9c8 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 |