Browse Source

That's better

Piotr Czajkowski 4 years ago
parent
commit
8f74a0644a
1 changed files with 3 additions and 8 deletions
  1. 3 8
      pwned.c

+ 3 - 8
pwned.c

@@ -45,16 +45,11 @@ char *getSuffixUppercase(const char *hash) {
 }
 
 int printNumber(char *text) {
-	char *part = strtok(text, ":");
+	char *part = strchr(text, ':');
 	if (part == NULL) return 0;
 	
-	part = strtok(NULL, ":");
-	if (part != NULL) {
-		printf("This is how many times your password was pwned: %s\n", part);
-		return 1;
-	}
-
-	return 0;
+	printf("This is how many times your password was pwned: %s\n", part+1);
+	return 1;
 }
 
 int findSuffix(const char *suffix, char *data) {