Skip to content

Commit

Permalink
add another check after #60
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored Feb 3, 2022
1 parent db77f32 commit 069e736
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/geom.c
Original file line number Diff line number Diff line change
Expand Up @@ -2579,7 +2579,8 @@ void init_prism(geometric_object *o) {
}
}
num_vertices = i + 1 - vector3_equal(vertices[0], vertices[i]);
if (prsm->vertices.num_items != num_vertices) {
CHECK(num_vertices >= 3, "fewer than 3 non-duplicate vertices in init_prism");
if (prsm->vertices.num_items < num_vertices) {
prsm->vertices.num_items = num_vertices;
vertices = (vector3 *)realloc(vertices, num_vertices * sizeof(vector3));
}
Expand Down

0 comments on commit 069e736

Please sign in to comment.