(svn r23392) -Fix: [NoAI] assigning 'null' to an AIList element to remove it didn't work

This commit is contained in:
yexo 2011-12-01 22:23:13 +00:00
parent 42c92be121
commit 1bc1a41937

View File

@ -745,7 +745,7 @@ SQInteger ScriptList::_get(HSQUIRRELVM vm)
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"));
}