Fix memory corruption in SpotShadow

The array list is too small and causing stack corruption

Change-Id: I0e34dad39357fb63977d2ce6f183ced7b6a632be
This commit is contained in:
Keith Mok
2015-11-10 16:52:05 -08:00
parent 37bf3ec9d2
commit a1f5631340

View File

@@ -742,7 +742,7 @@ inline void genNewPenumbraAndPairWithUmbra(const Vector2* penumbra, int penumbra
// vertex's location.
int newPenumbraNumber = indexDelta - 1;
float accumulatedDeltaLength[newPenumbraNumber];
float accumulatedDeltaLength[indexDelta];
float totalDeltaLength = 0;
// To save time, cache the previous umbra vertex info outside the loop