From cab503bb2bbe4e3c569a570740e75284c1c780a8 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Thu, 6 Dec 2012 16:21:55 +0100 Subject: [PATCH] CredentialStore: Fix off-by-one --- src/mirall/credentialstore.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mirall/credentialstore.cpp b/src/mirall/credentialstore.cpp index d9df049708..2af28d3957 100644 --- a/src/mirall/credentialstore.cpp +++ b/src/mirall/credentialstore.cpp @@ -84,7 +84,7 @@ void CredentialStore::fetchCredentials() MirallConfigFile cfgFile; MirallConfigFile::CredentialType t; - if( _tries++ == 3 ) { + if( ++_tries == 3 ) { qDebug() << "Too many attempts to enter password!"; _state = TooManyAttempts; return; @@ -117,7 +117,6 @@ void CredentialStore::fetchCredentials() break; } case MirallConfigFile::KeyChain: { - /* Qt Keychain is not yet implemented. */ #ifdef WITH_QTKEYCHAIN _state = AsyncFetching; if( !_user.isEmpty() ) {