diff options
Diffstat (limited to 'engines/glk/agt/util.cpp')
-rw-r--r-- | engines/glk/agt/util.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/glk/agt/util.cpp b/engines/glk/agt/util.cpp index 0bf96351f1..76b4a63e90 100644 --- a/engines/glk/agt/util.cpp +++ b/engines/glk/agt/util.cpp @@ -369,7 +369,8 @@ int fseek(genfile stream, long int offset, int whence) { size_t fread(void *ptr, size_t size, size_t nmemb, genfile stream) { Common::SeekableReadStream *rs = dynamic_cast<Common::SeekableReadStream *>(stream); assert(rs); - return rs->read(ptr, size * nmemb); + size_t bytesRead = rs->read(ptr, size * nmemb); + return bytesRead / size; } size_t fwrite(const void *ptr, size_t size, size_t nmemb, genfile stream) { |