From be6126ce289b61a6bac9944c2cb729d9daafbb9a Mon Sep 17 00:00:00 2001 From: Garux Date: Thu, 30 Dec 2021 19:57:37 +0300 Subject: [PATCH] fix crash introduced in 977781a62106fa5bc860caeccebaafb826e48f38 --- tools/quake3/q3map2/surface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/quake3/q3map2/surface.cpp b/tools/quake3/q3map2/surface.cpp index 545188f8..2068514e 100644 --- a/tools/quake3/q3map2/surface.cpp +++ b/tools/quake3/q3map2/surface.cpp @@ -1214,7 +1214,7 @@ void SubdivideFaceSurfaces( const entity_t& e ){ Sys_FPrintf( SYS_VRB, "--- SubdivideFaceSurfaces ---\n" ); /* walk the list of original surfaces, numMapDrawSurfs may increase in the process */ - for ( mapDrawSurface_t& ds : Span( mapDrawSurfs + e.firstDrawSurf, numMapDrawSurfs ) ) + for ( mapDrawSurface_t& ds : Span( mapDrawSurfs + e.firstDrawSurf, mapDrawSurfs + numMapDrawSurfs ) ) { /* only subdivide brush sides */ if ( ds.type != ESurfaceType::Face || ds.mapBrush == NULL || ds.sideRef == NULL || ds.sideRef->side == NULL ) {