Fix bug in fs.openSync

This commit is contained in:
Jarred Sumner
2023-01-29 00:10:34 -08:00
parent 75181ea1f3
commit 192629c8ca

View File

@@ -971,7 +971,7 @@ pub const FileSystemFlags = enum(Mode) {
if (val.isNumber()) {
const number = val.toInt32();
if (!(number > 0o000 and number < 0o777)) {
if (!(number >= 0o000 and number <= 0o777)) {
JSC.throwInvalidArguments(
"Invalid integer mode: must be a number between 0o000 and 0o777",
.{},