diff --git a/du6/program.c b/du6/program.c index a0c2a72..6157f4a 100644 --- a/du6/program.c +++ b/du6/program.c @@ -78,10 +78,10 @@ int main() } puts("Prijati studenti:"); for(int i = 0; i < SIZE; i++){ - if(pole_smernikov[i] == NULL){ - break; - } else{ + if(pole_smernikov[i] != NULL){ printf("%s\n", pole_smernikov[i]); + } else{ + } free(pole_smernikov[i]); }