diff options
author | Paul Gilbert | 2019-11-27 21:04:29 -0800 |
---|---|---|
committer | Paul Gilbert | 2019-11-27 21:10:29 -0800 |
commit | c3dbc2c40f68aebf04fa76cbb225bf81f43a8c41 (patch) | |
tree | 79425ed4970a5930b8cec5537eee06ddbf940d35 /engines/glk/agt/util.cpp | |
parent | 43579347eb7b852fb947f44d30e95450fd247936 (diff) | |
download | scummvm-rg350-c3dbc2c40f68aebf04fa76cbb225bf81f43a8c41.tar.gz scummvm-rg350-c3dbc2c40f68aebf04fa76cbb225bf81f43a8c41.tar.bz2 scummvm-rg350-c3dbc2c40f68aebf04fa76cbb225bf81f43a8c41.zip |
GLK: AGT: Route savegames through the engine
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 c91e47a74f..47900fc74e 100644 --- a/engines/glk/agt/util.cpp +++ b/engines/glk/agt/util.cpp @@ -376,7 +376,8 @@ size_t fread(void *ptr, size_t size, size_t nmemb, genfile stream) { size_t fwrite(const void *ptr, size_t size, size_t nmemb, genfile stream) { Common::WriteStream *ws = dynamic_cast<Common::WriteStream *>(stream); assert(ws); - return ws->write(ptr, size * nmemb); + size_t bytesWritten = ws->write(ptr, size * nmemb); + return bytesWritten / size; } size_t ftell(genfile f) { |