From 22750c5853698817278cef512d253175ccc08c56 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 9 May 2022 11:42:14 -0700 Subject: web: fix memory bugs --- web/web_scoreboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/web_scoreboard.c') diff --git a/web/web_scoreboard.c b/web/web_scoreboard.c index 8626443..495a7b6 100644 --- a/web/web_scoreboard.c +++ b/web/web_scoreboard.c @@ -46,7 +46,7 @@ void scoreboard_set_player_sugg(int pn, char *str) void scoreboard_set_player_avg(int pn, double avg) { - char *str = malloc(8); + char str[64]; sprintf(str, "%.2f", avg); bufstr_buf(&bufs[pn-1].avg, str); } -- cgit v1.2.3-70-g09d2