safety
This commit is contained in:
parent
44f6652b95
commit
adbd41f2bd
|
@ -265,8 +265,16 @@ float getInjectionModeDurationMultiplier(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
injection_mode_e mode = ENGINE(getCurrentInjectionMode(PASS_ENGINE_PARAMETER_SIGNATURE));
|
injection_mode_e mode = ENGINE(getCurrentInjectionMode(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case IM_SIMULTANEOUS:
|
case IM_SIMULTANEOUS: {
|
||||||
return 1.0f / engineConfiguration->specs.cylindersCount;
|
auto cylCount = engineConfiguration->specs.cylindersCount;
|
||||||
|
|
||||||
|
if (cylCount == 0) {
|
||||||
|
// we can end up here during configuration reset
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1.0f / cylCount;
|
||||||
|
}
|
||||||
case IM_SEQUENTIAL:
|
case IM_SEQUENTIAL:
|
||||||
case IM_SINGLE_POINT:
|
case IM_SINGLE_POINT:
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue