From 012d38a9a03d4674a54e32e4b9437092b4c047b3 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 26 Jan 2015 21:41:43 +0100 Subject: [PATCH] increasePinFails before asking PIN --- firmware/protect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/protect.c b/firmware/protect.c index 3067678fc..79819c6cf 100644 --- a/firmware/protect.c +++ b/firmware/protect.c @@ -156,6 +156,7 @@ bool protectPin(bool use_cached) delay(10000000); } } + storage_increasePinFails(); pin = requestPin(PinMatrixRequestType_PinMatrixRequestType_Current, "Please enter current PIN:"); if (!pin) { fsm_sendFailure(FailureType_Failure_PinCancelled, "PIN Cancelled"); @@ -166,7 +167,6 @@ bool protectPin(bool use_cached) storage_resetPinFails(); return true; } else { - storage_increasePinFails(); fsm_sendFailure(FailureType_Failure_PinInvalid, "Invalid PIN"); return false; }