Skip to content

Commit

Permalink
Fixed an infinite loop causing an anr
Browse files Browse the repository at this point in the history
  • Loading branch information
sbosley committed Nov 3, 2011
1 parent 2082051 commit 203d4b7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -304,7 +304,7 @@ private String generateRandomPassword() {
char last = 'a';
for (int i = 0; i < chars.length; i++) {
char r = acceptable.charAt(rand.nextInt(acceptable.length()));
while (checkSimilar(last, r))
while (!checkSimilar(last, r))
r = acceptable.charAt(rand.nextInt(acceptable.length()));
last = r;
chars[i] = r;
Expand Down

0 comments on commit 203d4b7

Please sign in to comment.