From 5b0650bdb79803e6a60bb4f0baf3c82197a7858d Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 26 Aug 2017 19:54:06 -0400 Subject: [PATCH] better state validation --- firmware/controllers/math/engine_math.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index 1f5fc8a36f..3013a05a71 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -132,8 +132,9 @@ bool FuelSchedule::addFuelEventsForCylinder(int i DECLARE_ENGINE_PARAMETER_SUFF // injection offset map not ready - we are not ready to schedule fuel events return false; } - angle_t baseAngle = injectionOffset - injectionDuration; + const angle_t baseAngle = injectionOffset - injectionDuration; efiAssert(!cisnan(baseAngle), "NaN baseAngle", false); + assertAngleRange(baseAngle, "baseAngle_r"); int index;