Skip to content

Commit 4968ef6

Browse files
committed
Add support for the "x" flag in std.open()
1 parent 92577d3 commit 4968ef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickjs-libc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ static JSValue js_std_open(JSContext *ctx, JSValue this_val,
10241024
mode = JS_ToCString(ctx, argv[1]);
10251025
if (!mode)
10261026
goto fail;
1027-
if (mode[strspn(mode, "rwa+b")] != '\0') {
1027+
if (mode[strspn(mode, "rwa+bx")] != '\0') {
10281028
JS_ThrowTypeError(ctx, "invalid file mode");
10291029
goto fail;
10301030
}

0 commit comments

Comments
 (0)