mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
SCI: Error out when kMemorySegment() is requested to save more than 256 bytes
This commit is contained in:
parent
76b68bf88c
commit
9adae61df3
@ -151,8 +151,13 @@ reg_t kMemorySegment(EngineState *s, int argc, reg_t *argv) {
|
||||
if (!size)
|
||||
size = s->_segMan->strlen(argv[1]) + 1;
|
||||
|
||||
if (size > EngineState::kMemorySegmentMax)
|
||||
size = EngineState::kMemorySegmentMax;
|
||||
if (size > EngineState::kMemorySegmentMax) {
|
||||
// This was set to cut the block to 256 bytes. This should be an
|
||||
// error, as we won't restore the full block that the game scripts
|
||||
// request, thus error out instead.
|
||||
//size = EngineState::kMemorySegmentMax;
|
||||
error("kMemorySegment: Requested to save more than 256 bytes (%d)", size);
|
||||
}
|
||||
|
||||
s->_memorySegmentSize = size;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user