Progsig: Fix error return path in CmdModifySignalInstruction

This commit is contained in:
Jonathan G Rennison
2019-04-28 11:10:35 +01:00
parent 06463b8be0
commit f331ae8f81

View File

@@ -609,7 +609,9 @@ CommandCost CmdModifySignalInstruction(TileIndex tile, DoCommandFlag flags, uint
} else if (f == SCF_VALUE) { } else if (f == SCF_VALUE) {
if (!exec) return CommandCost(); if (!exec) return CommandCost();
vc->value = val; vc->value = val;
} else CommandCost(STR_ERR_PROGSIG_INVALID_CONDITION_FIELD); } else {
return_cmd_error(STR_ERR_PROGSIG_INVALID_CONDITION_FIELD);
}
} break; } break;
case PSC_SIGNAL_STATE: { case PSC_SIGNAL_STATE: {