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; }