summaryrefslogtreecommitdiff
path: root/test/xd.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/xd.lua')
-rw-r--r--test/xd.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/xd.lua b/test/xd.lua
index 32331dc1..ebc3effc 100644
--- a/test/xd.lua
+++ b/test/xd.lua
@@ -2,12 +2,12 @@
-- usage: lua xd.lua < file
local offset=0
-
-while 1 do
+while true do
local s=io.read(16)
if s==nil then return end
io.write(string.format("%08X ",offset))
- string.gsub(s,"(.)",function (c) io.write(string.format("%02X ",string.byte(c))) end)
+ string.gsub(s,"(.)",
+ function (c) io.write(string.format("%02X ",string.byte(c))) end)
io.write(string.rep(" ",3*(16-string.len(s))))
io.write(" ",string.gsub(s,"%c","."),"\n")
offset=offset+16