mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
GOB: Add a sanity check to o1_freeFont
svn-id: r55537
This commit is contained in:
parent
e3f1d02044
commit
a3baa1874a
@ -1762,6 +1762,12 @@ bool Inter_v1::o1_freeFont(OpFuncParams ¶ms) {
|
||||
int16 index;
|
||||
|
||||
index = _vm->_game->_script->readInt16();
|
||||
|
||||
if (index >= Draw::kFontCount) {
|
||||
warning("o1_freeFont(): Index %d > count %d", index, Draw::kFontCount);
|
||||
return false;
|
||||
}
|
||||
|
||||
delete _vm->_draw->_fonts[index];
|
||||
_vm->_draw->_fonts[index] = 0;
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user