1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
Origin: https://github.com/L1L1/cardpeek/pull/110
From: =?UTF-8?q?David=20Santamar=C3=ADa=20Rogado?= <howl.nsp@gmail.com>
Date: Sat, 8 Feb 2020 21:46:17 +0100
Subject: [PATCH 1/3] apdu.lua: convert to integer #atr output
Lua 5.3 changes the way behaves with floats and integers.
To maintain the same output as with Lua 5.2 convert #atr to integer.
This way cold ATR appears as for example 23 instead 23.0.
Signed-off-by: David Santamara Rogado <howl.nsp@gmail.com>
---
dot_cardpeek_dir/scripts/lib/apdu.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dot_cardpeek_dir/scripts/lib/apdu.lua b/dot_cardpeek_dir/scripts/lib/apdu.lua
index f139b60..87f1a5a 100644
--- a/dot_cardpeek_dir/scripts/lib/apdu.lua
+++ b/dot_cardpeek_dir/scripts/lib/apdu.lua
@@ -113,7 +113,7 @@ function card.tree_startup(title)
atrnode = mycard:append({ classname="atr",
label="cold ATR",
- size=#atr,
+ size=math.tointeger(#atr),
val=atr })
if candidates then
|