bugfixes
This commit is contained in:
parent
484c42c4a4
commit
1dd54d4afb
|
@ -55,7 +55,7 @@ function format_percent(options, number, mult)
|
|||
percent = number * 100
|
||||
end
|
||||
|
||||
return string.format('%.2f ', percent) .. '% ' .. string.rep(' ', #options.unit)
|
||||
return string.format('%.2f ', percent) .. '% ' .. string.rep(' ', #(options.unit or ''))
|
||||
end
|
||||
|
||||
-- format temperature as number with two decimals and padded unit
|
||||
|
@ -67,7 +67,7 @@ function format_temp(options, number)
|
|||
else temperature = string.format('%.2f ', temperature) end
|
||||
|
||||
-- build string
|
||||
return temperature .. 'K ' .. string.rep(' ', #options.unit)
|
||||
return temperature .. 'K ' .. string.rep(' ', #(options.unit or ''))
|
||||
end
|
||||
|
||||
-- format liquids as compact number and padded unit
|
||||
|
|
Loading…
Reference in New Issue
Block a user