mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 17:59:30 +00:00
Fix string.format errors on Lua 5.1 when using booleans or nil
This commit is contained in:
parent
66f1a5a3c2
commit
3c84d1fbdd
4 changed files with 6 additions and 6 deletions
|
|
@ -6541,7 +6541,7 @@ local codeCache = {} -- candran.can:200
|
|||
candran["loadfile"] = function(filepath, env, options) -- candran.can:203
|
||||
local f, err = io["open"](filepath) -- candran.can:204
|
||||
if not f then -- candran.can:205
|
||||
return nil, ("cannot open %s"):format(err) -- candran.can:206
|
||||
return nil, ("cannot open %s"):format(tostring(err)) -- candran.can:206
|
||||
end -- candran.can:206
|
||||
local content = f:read("*a") -- candran.can:208
|
||||
f:close() -- candran.can:209
|
||||
|
|
@ -6651,7 +6651,7 @@ if r then -- candran.can:321
|
|||
return r(modpath, filepath) -- candran.can:322
|
||||
else -- candran.can:322
|
||||
error(("error loading candran module '%s' from file '%s':\
|
||||
%s"):format(modpath, filepath, s), 0) -- candran.can:324
|
||||
%s"):format(modpath, filepath, tostring(s)), 0) -- candran.can:324
|
||||
end -- candran.can:324
|
||||
end, filepath -- candran.can:326
|
||||
end -- candran.can:326
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue