[Scummvm-git-logs] scummvm master -> b5c4802ea808181915f304da0f25844789730b1c

sluicebox noreply at scummvm.org
Sat Aug 24 21:38:12 UTC 2024


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:
b5c4802ea8 COMMON: Remove MemoryReadStream::seek() assertion


Commit: b5c4802ea808181915f304da0f25844789730b1c
    https://github.com/scummvm/scummvm/commit/b5c4802ea808181915f304da0f25844789730b1c
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-08-24T14:38:09-07:00

Commit Message:
COMMON: Remove MemoryReadStream::seek() assertion

Changed paths:
    common/stream.cpp


diff --git a/common/stream.cpp b/common/stream.cpp
index 3c8cb40f990..e408fbe7057 100644
--- a/common/stream.cpp
+++ b/common/stream.cpp
@@ -145,8 +145,10 @@ bool MemoryReadStream::seek(int64 offs, int whence) {
 		_pos += offs;
 		break;
 	}
-	// Post-Condition
-	assert(_pos <= _size);
+	
+	if (!(_pos <= _size)) {
+		_pos = _size;
+	}
 
 	// Reset end-of-stream flag on a successful seek
 	_eos = false;




More information about the Scummvm-git-logs mailing list