summaryrefslogtreecommitdiff
path: root/web/web_scoreboard.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-09 11:42:14 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-09 11:42:14 -0700
commit22750c5853698817278cef512d253175ccc08c56 (patch)
tree106dad9ae02c2d24632868062b9004fcf812e1bc /web/web_scoreboard.c
parent4dbcd4a1b703d8b0ee822914ecb6e55d9e9bb37c (diff)
downloaddartboat-22750c5853698817278cef512d253175ccc08c56.tar.gz
dartboat-22750c5853698817278cef512d253175ccc08c56.tar.xz
web: fix memory bugs
Diffstat (limited to 'web/web_scoreboard.c')
-rw-r--r--web/web_scoreboard.c2
1 files changed, 1 insertions, 1 deletions
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);
}