[Scummvm-git-logs] scummvm master -> 4241d3fae4642ccf6daa96797460bee74d4ac1b3
bluegr
bluegr at gmail.com
Mon Aug 16 17:20:40 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4241d3fae4 SCI: Fix bug #12808 - restore the behavior of seek() in SCI
Commit: 4241d3fae4642ccf6daa96797460bee74d4ac1b3
https://github.com/scummvm/scummvm/commit/4241d3fae4642ccf6daa96797460bee74d4ac1b3
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-08-16T20:20:23+03:00
Commit Message:
SCI: Fix bug #12808 - restore the behavior of seek() in SCI
With the latest changes to savegame streams, seeking to a location
past the end of a file results in an assert. Restore the previous
behavior, where the file pointer seeks to the maximum available
file location.
Changed paths:
engines/sci/engine/kfile.cpp
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index a214b16ff9..84c8c228f0 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -773,6 +773,7 @@ reg_t kFileIOSeek(EngineState *s, int argc, reg_t *argv) {
FileHandle *f = getFileFromHandle(s, handle);
if (f && f->_in) {
+ offset = MIN<int16>(offset, f->_in->size());
const bool success = f->_in->seek(offset, whence);
if (getSciVersion() >= SCI_VERSION_2) {
if (success) {
More information about the Scummvm-git-logs
mailing list