Skip to content

Commit

Permalink
Add support for the "x" flag in std.open()
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Dec 3, 2024
1 parent 92577d3 commit 4968ef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quickjs-libc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ static JSValue js_std_open(JSContext *ctx, JSValue this_val,
mode = JS_ToCString(ctx, argv[1]);
if (!mode)
goto fail;
if (mode[strspn(mode, "rwa+b")] != '\0') {
if (mode[strspn(mode, "rwa+bx")] != '\0') {
JS_ThrowTypeError(ctx, "invalid file mode");
goto fail;
}
Expand Down

0 comments on commit 4968ef6

Please sign in to comment.