Selaa lähdekoodia

Fixed assertion in Curve where a curve with one key frame failed the assertion.

Darryl Gough 13 vuotta sitten
vanhempi
sitoutus
4e3640edeb
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      gameplay/src/Curve.cpp

+ 1 - 1
gameplay/src/Curve.cpp

@@ -119,7 +119,7 @@ void Curve::setPoint(unsigned int index, float time, float* value, Interpolation
 
 
 void Curve::setPoint(unsigned int index, float time, float* value, InterpolationType type, float* inValue, float* outValue)
 void Curve::setPoint(unsigned int index, float time, float* value, InterpolationType type, float* inValue, float* outValue)
 {
 {
-    assert(index < _pointCount && time >= 0.0f && time <= 1.0f && !(index == 0 && time != 0.0f) && !(_pointCount != 1 && index == _pointCount - 1 && time != 1.0f));
+    assert(index < _pointCount && time >= 0.0f && time <= 1.0f && !(_pointCount > 1 && index == 0 && time != 0.0f) && !(_pointCount != 1 && index == _pointCount - 1 && time != 1.0f));
 
 
     _points[index].time = time;
     _points[index].time = time;
     _points[index].type = type;
     _points[index].type = type;