diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/stream.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/stream.cpp b/common/stream.cpp index 1cdcd50723..8614939e54 100644 --- a/common/stream.cpp +++ b/common/stream.cpp @@ -69,7 +69,7 @@ bool MemoryReadStream::seek(int32 offs, int whence) { case SEEK_END: // SEEK_END works just like SEEK_SET, only 'reversed', // i.e. from the end. - offs = _size - offs; + offs = _size + offs; // Fall through case SEEK_SET: _ptr = _ptrOrig + offs; @@ -204,7 +204,7 @@ bool SeekableSubReadStream::seek(int32 offset, int whence) { switch(whence) { case SEEK_END: - offset = size() - offset; + offset = size() + offset; // fallthrough case SEEK_SET: _pos = _begin + offset; |