Skip to content

Commit 239cba9

Browse files
committed
day02 c / use MAX_LINE - 7 as max password length
1 parent cc2a1cc commit 239cba9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

days/day-02/solutions/day02.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ int main() {
1010
int from = 0;
1111
int to = 0;
1212
char letter = 0;
13-
char password[30];
13+
char password[MAX_LINE-7];
1414
sscanf(line, "%d-%d %c: %s", &from, &to, &letter, password);
1515

1616
int letter_occurances = 0;

0 commit comments

Comments
 (0)