1
0
Fork 0
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:
Étienne Fildadut 2021-06-09 13:43:52 +02:00
parent 66f1a5a3c2
commit 3c84d1fbdd
4 changed files with 6 additions and 6 deletions

View file

@ -15,7 +15,7 @@ if args.help or args.h then
print("Default options:")
for opt, val in pairs(candran.default) do
if type(val) == "string" then val = val:gsub("\n", "\\n") end
print((" %s=%q"):format(opt, val))
print((" %s=%q"):format(opt, tostring(val)))
end
return
end