aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/text/text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/text/text.cpp')
-rw-r--r--engines/zvision/text/text.cpp4
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