From 11bc008f12780f432ed67004cb611fb303772ee3 Mon Sep 17 00:00:00 2001 From: mr314ot Date: Thu, 9 Oct 2025 19:07:24 +0200 Subject: [PATCH] du2 - 8 --- du2/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/du2/program.c b/du2/program.c index 66c08d3..a244fb4 100644 --- a/du2/program.c +++ b/du2/program.c @@ -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;