Fix buffer overflow in exportGraphics

This commit is contained in:
2020-01-19 13:11:24 -05:00
parent 4fdd330d07
commit cb8bf96832

View File

@@ -1167,7 +1167,7 @@ void cUniverse::exportGraphics() {
}
}
for(mon_num_t monst : party.imprisoned_monst) {
if(monst != 0)
if(monst > 0 && monst < scenario.scen_monsters.size())
check_monst(scenario.scen_monsters[monst]);
}
// And then, just add all the graphics, and update references to them