We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a57877c commit 29a2f97Copy full SHA for 29a2f97
quickjs.c
@@ -35224,6 +35224,13 @@ static const char * const bc_tag_str[] = {
35224
"Set",
35225
"Symbol",
35226
};
35227
+
35228
+static const char *bc_tag_name(uint8_t tag)
35229
+{
35230
+ if (tag >= countof(bc_tag_str))
35231
+ return "<bad tag>";
35232
+ return bc_tag_str[tag];
35233
+}
35234
#endif
35235
35236
static void bc_put_u8(BCWriterState *s, uint8_t v)
@@ -37077,7 +37084,7 @@ static JSValue JS_ReadObjectRec(BCReaderState *s)
37077
37084
if (bc_get_u8(s, &tag))
37078
37085
return JS_EXCEPTION;
37079
37086
37080
- bc_read_trace(s, "%s {\n", bc_tag_str[tag]);
37087
+ bc_read_trace(s, "%s {\n", bc_tag_name(tag));
37081
37088
37082
37089
switch(tag) {
37083
37090
case BC_TAG_NULL:
0 commit comments