mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-06 19:08:15 +00:00
SUPERNOVA: Initializes clickField.next with 0
It seems it is possible that some objects or subsequent click fields 'pointed' to by next are outside of the initialized range and are expected to be zeroed. This would explain the non-deterministic freezes I experienced.
This commit is contained in:
parent
83523ebbdc
commit
aa447e81bc
@ -98,6 +98,9 @@ bool MSNImageDecoder::loadStream(Common::SeekableReadStream &stream) {
|
||||
}
|
||||
|
||||
_numClickFields = stream.readByte();
|
||||
for (int i = 0; i < kMaxClickFields; ++i) {
|
||||
_clickField[i].next = 0;
|
||||
}
|
||||
for (int i = 0; i < _numClickFields; ++i) {
|
||||
_clickField[i].x1 = stream.readUint16LE();
|
||||
_clickField[i].x2 = stream.readUint16LE();
|
||||
|
Loading…
x
Reference in New Issue
Block a user