fix out-of-bounds accesses in DrawableList::draw

This commit is contained in:
Adam Jensen 2023-04-09 17:37:27 +01:00
parent 853e1efda9
commit 4d55c0185f

View File

@ -168,7 +168,7 @@ void DrawableList::draw(RenderFunctionSet *funcSet, uint32_t funcSetIndex) {
bool matchPrev = prev &&
prev->typeID == drawable->typeID &&
prev->getVtable() == drawable->getVtable();
funcSet->func[drawable->typeID](funcSetIndex, drawable, prev);
funcSet->func[drawable->typeID](funcSetIndex, drawable, matchPrev ? prev : nullptr);
item = item->next;
}
}