From 90605ab4d10cd61dc72c3c52ea6f61f4a63de5a3 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 25 Dec 2015 01:15:48 -0800 Subject: [PATCH] don't output anything with empty input --- lips.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lips.lua b/lips.lua index 16a3563..f33a189 100644 --- a/lips.lua +++ b/lips.lua @@ -1596,7 +1596,7 @@ end function assembler.word_writer() local buff = {} - local max = 0 + local max = -1 return function(pos, b) if pos then buff[pos] = b @@ -1604,6 +1604,7 @@ function assembler.word_writer() max = pos end else + if max == -1 then return end for i=0, max, 4 do local a = buff[i+0] or '00' local b = buff[i+1] or '00'