diff --git a/cv10/program.c b/cv10/program.c index ef41b2c..450028f 100644 --- a/cv10/program.c +++ b/cv10/program.c @@ -20,7 +20,7 @@ int main() { } i = 0; - while (scanf("%s", buffer) == 1 && strcmp(buffer, "") != 0) { + while (i < count && scanf("%s", buffer) == 1) { int found = 0; for (j = 0; j < i; j++) { if (strcmp(applications[j], buffer) == 0) {