mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 09:59:29 +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
2
bin/can
2
bin/can
|
|
@ -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
|
||||
|
|
|
|||
2
bin/canc
2
bin/canc
|
|
@ -23,7 +23,7 @@ if #arg < 1 or 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue