This commit is contained in:
mr314ot 2025-10-09 19:07:24 +02:00
parent 4eaf1ab6fb
commit 11bc008f12

View File

@ -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;