diff --git a/core/src/net/sf/openrocket/motor/ThrustCurveMotor.java b/core/src/net/sf/openrocket/motor/ThrustCurveMotor.java index 904b87053..51f78e511 100644 --- a/core/src/net/sf/openrocket/motor/ThrustCurveMotor.java +++ b/core/src/net/sf/openrocket/motor/ThrustCurveMotor.java @@ -338,11 +338,11 @@ public class ThrustCurveMotor implements Motor, Comparable, Se int timeIndex = 0; - while( timeIndex < time.length-2 && startTime > time[timeIndex+1] ) { + while( timeIndex < time.length-1 && startTime > time[timeIndex+1] ) { timeIndex++; } - if ( timeIndex == time.length ) { + if ( timeIndex == time.length-1 ) { return 0.0; }