pridanie podmienky pre zle nacitanie
This commit is contained in:
parent
ca874baf8d
commit
788b9ca2fa
@ -56,7 +56,7 @@ int main(){
|
||||
}
|
||||
ptr2 = fgets(temp, 20, stdin);
|
||||
food_database[meal_counter].price = strtof(temp, NULL);
|
||||
if ( ptr2 == NULL ){
|
||||
if ( ptr2 == NULL || food_database[meal_counter].price == 0){
|
||||
break;
|
||||
}
|
||||
meal_counter++;
|
||||
|
Loading…
Reference in New Issue
Block a user