Fixing IsValid outputting the opposite of being valid

This commit is contained in:
James 2020-06-20 14:10:10 +10:00 committed by GitHub
parent e9cbcd173d
commit 1d4dfe7d4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1071,7 +1071,7 @@ SQInteger IsValid_stub(HSQUIRRELVM vm)
{
ClassInstanceData* classInstanceData = nullptr;
sq_getinstanceup(vm, 1, (SQUserPointer*)&classInstanceData, 0);
sq_pushbool(vm, classInstanceData == nullptr);
sq_pushbool(vm, classInstanceData != nullptr);
return 1;
}
@ -3034,4 +3034,4 @@ bool SquirrelVM::RaiseException(const char* pszExceptionText)
IScriptVM* makeSquirrelVM()
{
return new SquirrelVM;
}
}