From 4968ef6e90e080673dcc733cbc658558d2f3903b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 3 Dec 2024 09:36:28 +0100 Subject: [PATCH] Add support for the "x" flag in std.open() --- quickjs-libc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickjs-libc.c b/quickjs-libc.c index 1b138b5..1567dbc 100644 --- a/quickjs-libc.c +++ b/quickjs-libc.c @@ -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; }