diff options
author | Filippos Karapetis | 2010-12-22 13:17:19 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-12-22 13:17:19 +0000 |
commit | 5a3ed29a4be47cca6d0ab34b26a228317f15d817 (patch) | |
tree | a0f0ff6de2b5a13deb319110ec1871e455a264cd | |
parent | ada3c01cc1568ad3a1d39496dc65e25e40aed6ac (diff) | |
download | scummvm-rg350-5a3ed29a4be47cca6d0ab34b26a228317f15d817.tar.gz scummvm-rg350-5a3ed29a4be47cca6d0ab34b26a228317f15d817.tar.bz2 scummvm-rg350-5a3ed29a4be47cca6d0ab34b26a228317f15d817.zip |
SCI: Changed the check for NULL values inside kArray(Cpy) to only ignore such values in SCI3
svn-id: r55002
-rw-r--r-- | engines/sci/engine/klists.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
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]; |