fix crashes on Win64 builds caused by stack overflow in R_DrawRTLight
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 4 Sep 2008 05:56:33 +0000 (05:56 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 4 Sep 2008 05:56:33 +0000 (05:56 +0000)
(reported by Willis)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8488 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 067910e..414560e 100644 (file)
@@ -2860,10 +2860,10 @@ void R_DrawRTLight(rtlight_t *rtlight, qboolean visible)
        int numlightentities_noselfshadow;
        int numshadowentities;
        int numshadowentities_noselfshadow;
-       entity_render_t *lightentities[MAX_EDICTS];
-       entity_render_t *lightentities_noselfshadow[MAX_EDICTS];
-       entity_render_t *shadowentities[MAX_EDICTS];
-       entity_render_t *shadowentities_noselfshadow[MAX_EDICTS];
+       static entity_render_t *lightentities[MAX_EDICTS];
+       static entity_render_t *lightentities_noselfshadow[MAX_EDICTS];
+       static entity_render_t *shadowentities[MAX_EDICTS];
+       static entity_render_t *shadowentities_noselfshadow[MAX_EDICTS];
 
        // skip lights that don't light because of ambientscale+diffusescale+specularscale being 0 (corona only lights)
        // skip lights that are basically invisible (color 0 0 0)