From c63651cce2e01a89e9e9d7e4b2f26fc424a94345 Mon Sep 17 00:00:00 2001 From: rxi Date: Sat, 19 Apr 2014 09:32:38 +0100 Subject: [PATCH] Fixed lovebird.print() to handle `nil` properly --- lovebird.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lovebird.lua b/lovebird.lua index 2237bbb..0e3e69a 100644 --- a/lovebird.lua +++ b/lovebird.lua @@ -476,7 +476,11 @@ end function lovebird.print(...) - local str = table.concat(lovebird.map({...}, tostring), " ") + local t = {} + for i = 1, select("#", ...) do + table.insert(t, tostring(select(i, ...))) + end + local str = table.concat(t, " ") local last = lovebird.lines[#lovebird.lines] if last and str == last.str then -- Update last line if this line is a duplicate of it