mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-11 08:49:50 +00:00
Fix #7108: Group livery command did not check its parameters properly.
This commit is contained in:
parent
e21ade375e
commit
cca952d94b
@ -658,6 +658,8 @@ CommandCost CmdSetGroupLivery(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
|
||||
|
||||
if (g == NULL || g->owner != _current_company) return CMD_ERROR;
|
||||
|
||||
if (colour >= COLOUR_END && colour != INVALID_COLOUR) return CMD_ERROR;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
if (primary) {
|
||||
SB(g->livery.in_use, 0, 1, colour != INVALID_COLOUR);
|
||||
|
Loading…
Reference in New Issue
Block a user