From 48ae4f6d3057e5a7056d00fc2cd220b0cd64f26d Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 7 Jan 2023 17:28:14 +0200 Subject: [PATCH] Another valgrind uninitialized bytes complaint --- src/light.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/light.c b/src/light.c index f458fcbd3..d7b4f916d 100644 --- a/src/light.c +++ b/src/light.c @@ -74,6 +74,7 @@ new_light_core(coordxy x, coordxy y, int range, int type, anything *id) ls = (light_source *) alloc(sizeof *ls); + (void) memset((genericptr_t) ls, 0, sizeof (light_source)); ls->next = gl.light_base; ls->x = x; ls->y = y;