Fix default open mode in redbean unix.open()

This commit is contained in:
Justine Tunney 2024-09-14 00:10:21 -07:00
parent 7d2c363963
commit ed1f992cb7
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -1008,7 +1008,7 @@ static int LuaUnixOpen(lua_State *L) {
return SysretInteger(
L, "open", olderr,
openat(luaL_optinteger(L, 4, AT_FDCWD), luaL_checkstring(L, 1),
luaL_optinteger(L, 2, O_RDONLY), luaL_optinteger(L, 3, 0)));
luaL_optinteger(L, 2, O_RDONLY), luaL_optinteger(L, 3, 0644)));
}
// unix.tmpfd()