]> granicus.if.org Git - nethack/commitdiff
Another valgrind uninitialized bytes complaint
authorPasi Kallinen <paxed@alt.org>
Sat, 7 Jan 2023 15:28:14 +0000 (17:28 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 7 Jan 2023 15:28:14 +0000 (17:28 +0200)
src/light.c

index f458fcbd32f0f35f62c61189641cdb481173eb92..d7b4f916da672c18f53c43cd7c126174847127e4 100644 (file)
@@ -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;