program.c
This commit is contained in:
parent
bdae343f92
commit
2893a025db
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user