vis: allocate extra dist/sides slot in ClipStackWinding

We use one extra to simplify checking when an edge crosses the split
plane.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2013-04-21 10:14:52 +09:30
parent ba88986462
commit 97371bc6ab
1 changed files with 2 additions and 2 deletions

View File

@ -235,8 +235,8 @@ FreeStackWinding(winding_t *w, pstack_t *stack)
winding_t *
ClipStackWinding(winding_t *in, pstack_t *stack, plane_t *split)
{
vec_t dists[MAX_WINDING];
int sides[MAX_WINDING];
vec_t dists[MAX_WINDING + 1];
int sides[MAX_WINDING + 1];
int counts[3];
vec_t dot;
int i, j;