vis: fix stack separator cache overflow check
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
fa93a21598
commit
186ca8863b
|
|
@ -125,9 +125,10 @@ ClipToSeperators(const winding_t *source,
|
|||
|
||||
/* Cache separating planes for tests 0, 1 */
|
||||
if (test < 2) {
|
||||
stack->separators[test][stack->numseparators[test]] = sep;
|
||||
if (++stack->numseparators[test] >= MAX_SEPARATORS)
|
||||
if (stack->numseparators[test] == MAX_SEPARATORS)
|
||||
Error("MAX_SEPARATORS");
|
||||
stack->separators[test][stack->numseparators[test]] = sep;
|
||||
stack->numseparators[test]++;
|
||||
}
|
||||
|
||||
target = ClipStackWinding(target, stack, &sep);
|
||||
|
|
|
|||
Loading…
Reference in New Issue