Fix UBSAN warning caused by uninitialized memory use

Unwrapping warned that a non 0/1 boolean value was being set.

Initialize all members of PVert since they would be accessed
when duplicating a PVert causing the uninitialized memory to be read.
This commit is contained in:
Campbell Barton
2024-10-29 14:36:13 +11:00
parent f408531b9b
commit 066c6f3674

View File

@@ -730,6 +730,10 @@ static PVert *p_vert_add(
v->edge = e;
v->flag = 0;
/* Unused, prevent uninitialized memory access on duplication. */
v->on_boundary_flag = false;
v->slim_id = 0;
phash_insert(handle->hash_verts, (PHashLink *)v);
return v;