aboutsummaryrefslogtreecommitdiff
path: root/engines/glk
diff options
context:
space:
mode:
authorPaul Gilbert2019-10-06 11:24:23 -0700
committerPaul Gilbert2019-10-06 11:24:23 -0700
commit7caf897ee2e94a0c90601f55e476a1849b8c353b (patch)
treee47910e3e0d6a3108bc0dde0baf4ec98cfab9645 /engines/glk
parentd831218b985c1ab66bc4e52f6b79142eb0fa79b9 (diff)
downloadscummvm-rg350-7caf897ee2e94a0c90601f55e476a1849b8c353b.tar.gz
scummvm-rg350-7caf897ee2e94a0c90601f55e476a1849b8c353b.tar.bz2
scummvm-rg350-7caf897ee2e94a0c90601f55e476a1849b8c353b.zip
GLK: Improve abysmal performance of stream read check
Diffstat (limited to 'engines/glk')
-rw-r--r--engines/glk/streams.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/glk/streams.cpp b/engines/glk/streams.cpp
index d6d62ddbec..5a739b3240 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->pos() >= _inStream->size()) ? -1 : _inStream->readByte();
+ res = _inStream->eos() ? -1 : _inStream->readByte();
} else if (_textFile) {
res = getCharUtf8();
} else {