diff --git a/neo/renderer/tr_light.cpp b/neo/renderer/tr_light.cpp index 5a04cc03..72b5970a 100644 --- a/neo/renderer/tr_light.cpp +++ b/neo/renderer/tr_light.cpp @@ -1634,7 +1634,7 @@ void R_RemoveUnecessaryViewLights( void ) { return ((sortLight_t*)a)->screenArea - ((sortLight_t*)b)->screenArea; } }; - sortLight_t* sortLights = (sortLight_t*)_malloca(sizeof(sortLight_t) * numViewLights); + sortLight_t* sortLights = (sortLight_t*)_alloca(sizeof(sortLight_t) * numViewLights); int numSortLightsFilled = 0; for (viewLight_t* vLight = tr.viewDef->viewLights; vLight != NULL; vLight = vLight->next) { sortLights[numSortLightsFilled].vLight = vLight;