Be more strict checking for space in program pool in mgmt actions.

This commit is contained in:
Jonathan G Rennison
2016-03-03 19:14:10 +00:00
parent 1bb3024534
commit 8dc76b0044

View File

@@ -1003,6 +1003,10 @@ CommandCost CmdProgramSignalTraceRestrictProgMgmt(TileIndex tile, DoCommandFlag
} }
} }
if (type != TRDCT_PROG_RESET && !TraceRestrictProgram::CanAllocateItem()) {
return CMD_ERROR;
}
if (!(flags & DC_EXEC)) { if (!(flags & DC_EXEC)) {
return CommandCost(); return CommandCost();
} }