Skip to content

Commit 28e3993

Browse files
committed
Also clear PIN flags when verification failed (partial fix for #9)
1 parent 908c40e commit 28e3993

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/CHV.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ int CHV_PIN_verify(CHV_PIN *pin, unsigned int length, unsigned char *buffer) {
6262
debugWarning("PIN verification failed");
6363
debugInteger("Tries left", pin->count - 1);
6464
--(pin->count);
65+
CHV_flags &= (0xFF ^ pin->flag);
6566
} else {
6667
debugMessage("PIN verified");
6768
pin->count = CHV_PIN_COUNT;

0 commit comments

Comments
 (0)