mirror of
https://github.com/bellard/quickjs.git
synced 2024-11-25 23:28:12 +08:00
skip verification of class ID in JS_GetOpaque if class_id is 0
This commit is contained in:
parent
6e2e68fd08
commit
77b100d5e6
@ -9847,7 +9847,7 @@ void *JS_GetOpaque(JSValueConst obj, JSClassID class_id)
|
|||||||
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
|
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
|
||||||
return NULL;
|
return NULL;
|
||||||
p = JS_VALUE_GET_OBJ(obj);
|
p = JS_VALUE_GET_OBJ(obj);
|
||||||
if (p->class_id != class_id)
|
if (class_id && p->class_id != class_id)
|
||||||
return NULL;
|
return NULL;
|
||||||
return p->u.opaque;
|
return p->u.opaque;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user