From 5a3ed29a4be47cca6d0ab34b26a228317f15d817 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 22 Dec 2010 13:17:19 +0000 Subject: SCI: Changed the check for NULL values inside kArray(Cpy) to only ignore such values in SCI3 svn-id: r55002 --- engines/sci/engine/klists.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index 50ac998afa..9eb1ae6e4b 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -703,9 +703,14 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) { } case 6: { // Cpy if (argv[1].isNull() || argv[3].isNull()) { - // Happens in SCI3 - warning("kArray(Cpy): Request to copy from or to a null pointer"); - return NULL_REG; + if (getSciVersion() == SCI_VERSION_3) { + // FIXME: Happens in SCI3, probably because of a missing kernel function. + warning("kArray(Cpy): Request to copy from or to a null pointer"); + return NULL_REG; + } else { + // SCI2-2.1: error out + error("kArray(Cpy): Request to copy from or to a null pointer"); + } } reg_t arrayHandle = argv[1]; -- cgit v1.2.3