mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2025-02-26 10:45:45 +00:00
draw: fix (safe) off-by-one error in R_RecursiveClipBPoly
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
e5c7bf9860
commit
371e16cbd8
@ -231,7 +231,7 @@ R_RecursiveClipBPoly(const entity_t *e, bedge_t *pedges, mnode_t *pnode,
|
||||
// split into two edges, one on each side, and remember entering
|
||||
// and exiting points
|
||||
// FIXME: share the clip edge by having a winding direction flag?
|
||||
if (numbedges >= (MAX_BMODEL_EDGES - 1)) {
|
||||
if (numbedges > MAX_BMODEL_EDGES - 2) {
|
||||
Con_Printf("Out of edges for bmodel\n");
|
||||
return;
|
||||
}
|
||||
@ -268,7 +268,7 @@ R_RecursiveClipBPoly(const entity_t *e, bedge_t *pedges, mnode_t *pnode,
|
||||
// if anything was clipped, reconstitute and add the edges along the clip
|
||||
// plane to both sides (but in opposite directions)
|
||||
if (makeclippededge) {
|
||||
if (numbedges >= (MAX_BMODEL_EDGES - 2)) {
|
||||
if (numbedges > MAX_BMODEL_EDGES - 2) {
|
||||
Con_Printf("Out of edges for bmodel\n");
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user