diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/segment.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index fd9b3f759e..2af47801b2 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -664,7 +664,9 @@ public: const reg_t *source = values; int16 *target = (int16 *)_data + index; while (count--) { - assert(source->isNumber()); + if (!source->isNumber()) { + error("Non-number %04x:%04x sent to int16 array", PRINT_REG(*source)); + } *target++ = source->toSint16(); ++source; } @@ -683,7 +685,9 @@ public: const reg_t *source = values; byte *target = (byte *)_data + index; while (count--) { - assert(source->isNumber()); + if (!source->isNumber()) { + error("Non-number %04x:%04x sent to byte or string array", PRINT_REG(*source)); + } *target++ = source->getOffset(); ++source; } |