unicode-monkeypatch: use tostring() in io.open error handling
msg can be nil, which would previously error out when trying to print it.
This commit is contained in:
parent
58c0130d81
commit
47c923d4ed
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ function io.open(fname, mode)
|
|||
local file = assert(orig_open("nul", "rb"))
|
||||
if ffi.C._wfreopen(wfname, wmode, file) == nil then
|
||||
local msg, errno = select(2, file:close())
|
||||
return nil, fname .. ": " .. msg, errno
|
||||
return nil, fname .. ": " .. tostring(msg), errno
|
||||
end
|
||||
|
||||
return file
|
||||
|
|
Loading…
Reference in a new issue