summaryrefslogtreecommitdiff
path: root/src/refresh/sw/poly.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refresh/sw/poly.c')
-rw-r--r--src/refresh/sw/poly.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/refresh/sw/poly.c b/src/refresh/sw/poly.c
index 860b59f..a31436e 100644
--- a/src/refresh/sw/poly.c
+++ b/src/refresh/sw/poly.c
@@ -620,6 +620,9 @@ static void R_BuildPolygonFromSurface(mface_t *fa)
// reconstruct the polygon
lnumverts = fa->numsurfedges;
+ if (lnumverts > MAXWORKINGVERTS)
+ Com_Error(ERR_DROP, "R_BuildPolygonFromSurface: too many points: %d", lnumverts);
+
pverts = r_clip_verts[0];
surfedge = fa->firstsurfedge;