mirror of
https://github.com/notwa/lips
synced 2024-11-14 18:29:03 -08:00
pass numbers to writer instead of hex strings
This commit is contained in:
parent
5c91e09151
commit
3290735c8f
2 changed files with 2 additions and 3 deletions
|
@ -233,8 +233,7 @@ end
|
||||||
|
|
||||||
function Dumper:write(t)
|
function Dumper:write(t)
|
||||||
for _, b in ipairs(t) do
|
for _, b in ipairs(t) do
|
||||||
local s = ('%02X'):format(b)
|
self.writer(self.pos, b)
|
||||||
self.writer(self.pos, s)
|
|
||||||
self.pos = self.pos + 1
|
self.pos = self.pos + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,7 +18,7 @@ function lips.word_writer()
|
||||||
local max = -1
|
local max = -1
|
||||||
return function(pos, b)
|
return function(pos, b)
|
||||||
if pos then
|
if pos then
|
||||||
buff[pos] = b
|
buff[pos] = ("%02X"):format(b)
|
||||||
if pos > max then
|
if pos > max then
|
||||||
max = pos
|
max = pos
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue