1
0
Fork 0

Codefix b2c5712: [Script] Properly check sq_instanceof return value

pull/13657/head
glx22 2025-02-24 21:21:02 +01:00
parent 02f040b22a
commit 6f3681a73d
1 changed files with 1 additions and 1 deletions

View File

@ -517,7 +517,7 @@ bool Squirrel::CreateClassInstance(const std::string &class_name, void *real_ins
sq_pushstring(vm, class_name);
sq_get(vm, -2);
sq_push(vm, index);
if (sq_instanceof(vm)) {
if (sq_instanceof(vm) == SQTrue) {
sq_pop(vm, 3);
SQUserPointer ptr = nullptr;
if (SQ_SUCCEEDED(sq_getinstanceup(vm, index, &ptr, nullptr))) return ptr;