mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
SCI32: Fix null references in Robot decoder
Failing to reduce the size of the ScreenItem arrays causes other parts of the decoder (like RobotDecoder::getFrameSize) to try reading ScreenItems that were already destroyed and nulled out in the list. (In SSCI, the screen item count was held in a separate property instead of being part of the screen item list.)
This commit is contained in:
parent
e00c773d95
commit
63ad0a6715
@ -1436,6 +1436,14 @@ void RobotDecoder::doVersion5(const bool shouldSubmitAudio) {
|
||||
_screenItemList[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (screenItemCount < oldScreenItemCount) {
|
||||
_screenItemList.resize(screenItemCount);
|
||||
_screenItemX.resize(screenItemCount);
|
||||
_screenItemY.resize(screenItemCount);
|
||||
_originalScreenItemX.resize(screenItemCount);
|
||||
_originalScreenItemY.resize(screenItemCount);
|
||||
}
|
||||
}
|
||||
|
||||
void RobotDecoder::createCels5(const byte *rawVideoData, const int16 numCels, const bool usePalette) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user