diff options
Diffstat (limited to 'engines/glk')
-rw-r--r-- | engines/glk/streams.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/glk/streams.cpp b/engines/glk/streams.cpp index 37cac4437a..d6d62ddbec 100644 --- a/engines/glk/streams.cpp +++ b/engines/glk/streams.cpp @@ -989,7 +989,7 @@ int IOStream::getChar() { ensureOp(filemode_Read); int res; if (!_unicode) { - res = _inStream->readByte(); + res = (_inStream->pos() >= _inStream->size()) ? -1 : _inStream->readByte(); } else if (_textFile) { res = getCharUtf8(); } else { |