Skip to content

Commit

Permalink
unicode-monkeypatch: use tostring() in io.open error handling
Browse files Browse the repository at this point in the history
msg can be nil, which would previously error out when trying to print it.
  • Loading branch information
arch1t3cht committed Dec 17, 2024
1 parent d6c4fd3 commit 907df21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion automation/include/unicode-monkeypatch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 907df21

Please sign in to comment.