diff options
author | rubidium <rubidium@openttd.org> | 2011-08-26 16:39:02 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-08-26 16:39:02 +0000 |
commit | 4836a6e50e94978e2f363d586838cea2bdb9c26e (patch) | |
tree | 14c32b2f0aa2dde2384308d54a3c0c65a4c2735f /src/autoreplace_cmd.cpp | |
parent | 9975f30eb76025ba911323f75e06b5f7d6e2e4a5 (diff) | |
download | openttd-4836a6e50e94978e2f363d586838cea2bdb9c26e.tar.xz |
(svn r22845) -Fix [FS#4745]: perform stricter checks on some commands (monoid)
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r-- | src/autoreplace_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 19a740de1..4cb3c9bf3 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -731,7 +731,7 @@ CommandCost CmdSetAutoReplace(TileIndex tile, DoCommandFlag flags, uint32 p1, ui GroupID id_g = GB(p1, 16, 16); CommandCost cost; - if (!Group::IsValidID(id_g) && !IsAllGroupID(id_g) && !IsDefaultGroupID(id_g)) return CMD_ERROR; + if (Group::IsValidID(id_g) ? Group::Get(id_g)->owner != _current_company : !IsAllGroupID(id_g) && !IsDefaultGroupID(id_g)) return CMD_ERROR; if (!Engine::IsValidID(old_engine_type)) return CMD_ERROR; if (new_engine_type != INVALID_ENGINE) { |