Sculpt-dev: fix memory corruption

This commit is contained in:
Joseph Eagar 2021-11-28 02:37:01 -08:00
parent 7ad9afd08a
commit 777168cc00
2 changed files with 1 additions and 4 deletions

View File

@ -1906,9 +1906,7 @@ static void short_edge_queue_edge_add(EdgeQueueContext *eq_ctx, BMEdge *e)
}
}
ATTR_NO_OPT static void long_edge_queue_face_add(EdgeQueueContext *eq_ctx,
BMFace *f,
bool ignore_frontface)
static void long_edge_queue_face_add(EdgeQueueContext *eq_ctx, BMFace *f, bool ignore_frontface)
{
#ifdef USE_EDGEQUEUE_FRONTFACE
if (!ignore_frontface && eq_ctx->q->use_view_normal) {

View File

@ -4379,7 +4379,6 @@ static void pbvh_pmap_to_edges_add(PBVH *pbvh,
if (*len >= *r_edges_size) {
int newsize = *len + ((*len) >> 1) + 1;
*heap_alloc = true;
int *r_edges_new = MEM_malloc_arrayN(newsize, sizeof(*r_edges_new), "r_edges_new");
int *r_polys_new = MEM_malloc_arrayN(newsize * 2, sizeof(*r_polys_new), "r_polys_new");