mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-15 11:45:42 +00:00
Make mode from io.open() accept nil
This commit is contained in:
parent
369be7c32c
commit
a5bbed528d
@ -68,7 +68,7 @@ function open( _sPath, _sMode )
|
||||
if _G.type( _sPath ) ~= "string" then
|
||||
error( "bad argument #1 (expected string, got " .. _G.type( _sPath ) .. ")", 2 )
|
||||
end
|
||||
if _G.type( _sMode ) ~= "string" then
|
||||
if _sMode ~= nil and _G.type( _sMode ) ~= "string" then
|
||||
error( "bad argument #2 (expected string, got " .. _G.type( _sMode ) .. ")", 2 )
|
||||
end
|
||||
local sMode = _sMode or "r"
|
||||
|
Loading…
Reference in New Issue
Block a user