mirror of https://github.com/odrling/Aegisub
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
|
@ -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 New Issue