du2 - 8
This commit is contained in:
parent
4eaf1ab6fb
commit
11bc008f12
@ -36,7 +36,7 @@ int read_pizza(struct pizza *item) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
strcpy(item->name, line1, LINESIZE - 1);
|
||||
strncpy(item->name, line1, LINESIZE - 1);
|
||||
item->name[LINESIZE - 1] = '\0';
|
||||
item->price = value;
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user