diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/web_control.c | 2 | ||||
-rw-r--r-- | web/web_scoreboard.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/web/web_control.c b/web/web_control.c index 0c2d4bd..0c220a5 100644 --- a/web/web_control.c +++ b/web/web_control.c @@ -203,7 +203,7 @@ void user_undo() struct leg *l = state->active_leg; struct visit *v = l->visits + --l->n_visits; l->rem += v->points; - memcpy(v, 0, sizeof(*v)); + memset(v, 0, sizeof(*v)); if (state->mode == M_PVC && state->legs[1]->n_visits > l->n_visits) { struct leg *bl = state->legs[1]; 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); } |