From 4f1d8943d6bae8d03aef81cdc9689acc60008a0e Mon Sep 17 00:00:00 2001 From: Adam Crowder Date: Thu, 9 Jul 2020 16:43:26 -0700 Subject: [PATCH] fix slot detection on yubikeys Signed-off-by: Adam Crowder --- src/keys/drivers/YubiKey.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keys/drivers/YubiKey.cpp b/src/keys/drivers/YubiKey.cpp index d64452f3e..7feeec89f 100644 --- a/src/keys/drivers/YubiKey.cpp +++ b/src/keys/drivers/YubiKey.cpp @@ -176,7 +176,7 @@ void YubiKey::findValidKeys() bool wouldBlock; QList> ykSlots; for (int slot = 1; slot <= 2; ++slot) { - auto config = (i == 1 ? CONFIG1_VALID : CONFIG2_VALID); + auto config = (slot == 1 ? CONFIG1_VALID : CONFIG2_VALID); if (!(ykds_touch_level(st) & config)) { // Slot is not configured continue;