Browse Source

Check your boundaries

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

+ 1 - 1
pwned.c

@@ -37,7 +37,7 @@ char *getSuffixUppercase(const char *hash) {
 }
 
 void printNumber(const char *data) {
-	for (int i = 0; data[i] != '\n'; i++)
+	for (int i = 0; data[i] != '\n' && data[i] != 0; i++)
 		putchar(data[i]);
 	putchar('\n');
 }