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:
Joseph-Eugene Winzer 2017-07-23 03:00:02 +02:00 committed by Thierry Crozat
parent 83523ebbdc
commit aa447e81bc

View File

@ -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();