fixed JS_IsString() with ropes

This commit is contained in:
Fabrice Bellard 2025-04-10 11:51:41 +02:00
parent 25ffdb418e
commit c505ac0f39

View File

@ -634,7 +634,8 @@ static inline JS_BOOL JS_IsUninitialized(JSValueConst v)
static inline JS_BOOL JS_IsString(JSValueConst v)
{
return JS_VALUE_GET_TAG(v) == JS_TAG_STRING;
return JS_VALUE_GET_TAG(v) == JS_TAG_STRING ||
JS_VALUE_GET_TAG(v) == JS_TAG_STRING_ROPE;
}
static inline JS_BOOL JS_IsSymbol(JSValueConst v)