From 03cfef5d90d6883082fb8a119e43346be407de24 Mon Sep 17 00:00:00 2001 From: fdai7472 Date: Mon, 5 Feb 2024 13:27:48 +0100 Subject: [PATCH] =?UTF-8?q?string=20winnerMessage=20l=C3=A4nger=20initiali?= =?UTF-8?q?siert,=20um=20overflow=20zu=20vermeiden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/c/Stefan/slot_machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/c/Stefan/slot_machine.c b/src/main/c/Stefan/slot_machine.c index f659eab..c3dbd65 100644 --- a/src/main/c/Stefan/slot_machine.c +++ b/src/main/c/Stefan/slot_machine.c @@ -129,7 +129,7 @@ int getWinnings(char symbols[], int bet){ void showResult(char symbols[], int winnings){ - char winnerMessage[] = {""}; + char winnerMessage[10] = {""}; if(winnings > 0){ strcpy(winnerMessage, " WINNER ");