mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-22 23:24:22 +08:00
7816_error - fix number to hex conversion (thanks @vortix)
This commit is contained in:
parent
2323ff7f57
commit
bd7f1c6bfb
1 changed files with 2 additions and 1 deletions
|
@ -71,7 +71,8 @@ _errorcodes.tostring = function(command)
|
||||||
return ("%s (%s)"):format(_reverse_lookup[command] or "ERROR UNDEFINED!", command)
|
return ("%s (%s)"):format(_reverse_lookup[command] or "ERROR UNDEFINED!", command)
|
||||||
end
|
end
|
||||||
if(type(command) == 'number') then
|
if(type(command) == 'number') then
|
||||||
return ("%s (%d)"):format(_reverse_lookup[ tostring(command)] or "ERROR UNDEFINED!", command)
|
local hx = ("%04X"):format(command)
|
||||||
|
return ("%s (0x%s)"):format(_reverse_lookup[hx] or "ERROR UNDEFINED!", hx)
|
||||||
end
|
end
|
||||||
return ("Error, numeric or string argument expected, got : %s"):format(tostring(command))
|
return ("Error, numeric or string argument expected, got : %s"):format(tostring(command))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue