I suspect that when you clear the data, you need to clear pressCnt as well. If you don't, each iteration of loop will see that if (pressCnt == Password_Length - 1) evaluates to true and goes through that block.
I suspect that when you clear the data, you need to clear pressCnt as well. If you don't, each iteration of loop will see that if (pressCnt == Password_Length - 1) evaluates to true and goes through that block.