diff options
Diffstat (limited to 'engines/gob/inter_v1.cpp')
-rw-r--r-- | engines/gob/inter_v1.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index f45c7d19ba..368a903496 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -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; |