diff options
author | Paul Gilbert | 2019-11-24 22:30:58 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-11-27 21:10:29 -0800 |
commit | 88444ddc889e4faee110b637961824fcb8abc448 (patch) | |
tree | fab409711e7eaf2105d9290f7c990b2ef5667830 /engines/glk/agt/util.cpp | |
parent | 28c3584148c49c1c6f118c5cbf13d0bf53d56726 (diff) | |
download | scummvm-rg350-88444ddc889e4faee110b637961824fcb8abc448.tar.gz scummvm-rg350-88444ddc889e4faee110b637961824fcb8abc448.tar.bz2 scummvm-rg350-88444ddc889e4faee110b637961824fcb8abc448.zip |
GLK: AGT: Initialization fixes
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) { |