program.c

This commit is contained in:
an760cw 2023-09-30 16:13:51 +02:00
parent bdae343f92
commit 2893a025db

View File

@ -87,9 +87,19 @@ int read_pizza(struct pizza* element) {
if (fgets(line, LINESIZE, stdin) == NULL) {
return 0;
}
if (line[1] == 0) {
int len = strlen(line);
if (len > 0 && line[len - 1] == '\n') {
line[len - 1] = '\0';
}
if (line[0] == '\0') {
return 0;
}
//if (line[1] == 0) {
//return 0;
//}
char line2[LINESIZE];
memset(line2, 0, LINESIZE);