# HG changeset patch # User yexo # Date 2011-12-01 22:23:13 # Node ID 4f2ae4af95a18f0c4759d89de7fd5e1620ddbf77 # Parent 5d7c138fcb4f5d3df91103918755bdf986a28534 (svn r23392) -Fix: [NoAI] assigning 'null' to an AIList element to remove it didn't work diff --git a/src/script/api/script_list.cpp b/src/script/api/script_list.cpp --- a/src/script/api/script_list.cpp +++ b/src/script/api/script_list.cpp @@ -745,7 +745,7 @@ SQInteger ScriptList::_get(HSQUIRRELVM v SQInteger ScriptList::_set(HSQUIRRELVM vm) { if (sq_gettype(vm, 2) != OT_INTEGER) return SQ_ERROR; - if (sq_gettype(vm, 3) != OT_INTEGER || sq_gettype(vm, 3) == OT_NULL) { + if (sq_gettype(vm, 3) != OT_INTEGER && sq_gettype(vm, 3) != OT_NULL) { return sq_throwerror(vm, _SC("you can only assign integers to this list")); }