From 22cbf774ad689a8ddd8989336894f13e3d5c6b5e Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 28 Jul 2018 14:01:28 -0400 Subject: [PATCH] #598 --- firmware/controllers/math/engine_math.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/controllers/math/engine_math.cpp b/firmware/controllers/math/engine_math.cpp index 0dacafd20a..9bb4f4dc97 100644 --- a/firmware/controllers/math/engine_math.cpp +++ b/firmware/controllers/math/engine_math.cpp @@ -406,7 +406,7 @@ int getCylinderId(int index DECLARE_ENGINE_PARAMETER_SUFFIX) { const int firingOrderLength = getFiringOrderLength(PASS_ENGINE_PARAMETER_SIGNATURE); - if (index < 1 || index > INJECTION_PIN_COUNT) { + if (firingOrderLength < 1 || firingOrderLength > INJECTION_PIN_COUNT) { firmwareError(CUSTOM_ERR_6687, "fol %d", firingOrderLength); return 1; }