From 47c923d4eda6925d38c5415b92622af4207ada09 Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Mon, 31 Jul 2023 23:41:43 +0200 Subject: [PATCH] unicode-monkeypatch: use tostring() in io.open error handling msg can be nil, which would previously error out when trying to print it. --- automation/include/unicode-monkeypatch.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/include/unicode-monkeypatch.lua b/automation/include/unicode-monkeypatch.lua index 81ca7d5ec..356e04f9b 100644 --- a/automation/include/unicode-monkeypatch.lua +++ b/automation/include/unicode-monkeypatch.lua @@ -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