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_control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/web_control.c') 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]; -- cgit v1.2.3-70-g09d2