mirror of
https://github.com/notwa/lips
synced 2024-05-18 16:33:22 -07:00
don't output anything with empty input
This commit is contained in:
parent
ce23d57db9
commit
90605ab4d1
3
lips.lua
3
lips.lua
|
@ -1596,7 +1596,7 @@ end
|
||||||
|
|
||||||
function assembler.word_writer()
|
function assembler.word_writer()
|
||||||
local buff = {}
|
local buff = {}
|
||||||
local max = 0
|
local max = -1
|
||||||
return function(pos, b)
|
return function(pos, b)
|
||||||
if pos then
|
if pos then
|
||||||
buff[pos] = b
|
buff[pos] = b
|
||||||
|
@ -1604,6 +1604,7 @@ function assembler.word_writer()
|
||||||
max = pos
|
max = pos
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
if max == -1 then return end
|
||||||
for i=0, max, 4 do
|
for i=0, max, 4 do
|
||||||
local a = buff[i+0] or '00'
|
local a = buff[i+0] or '00'
|
||||||
local b = buff[i+1] or '00'
|
local b = buff[i+1] or '00'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user