summaryrefslogtreecommitdiff
path: root/src/group_gui.cpp
diff options
context:
space:
mode:
authorglx22 <glx22@users.noreply.github.com>2019-09-07 18:37:01 +0200
committerCharles Pigott <charlespigott@googlemail.com>2019-09-07 17:37:01 +0100
commitb3fd7879596defeb6af78acb4ea45e4418821bdf (patch)
tree08b94b2cd65012e573b0e8c94196daab5aab12ba /src/group_gui.cpp
parent381c2a45875206afe43241d0c76619638cf613fc (diff)
downloadopenttd-b3fd7879596defeb6af78acb4ea45e4418821bdf.tar.xz
Fix #7188: check the validity of command callback for scripts (#7701)
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r--src/group_gui.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index 8cca33268..828a06160 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -1046,9 +1046,10 @@ static inline VehicleGroupWindow *FindVehicleGroupWindow(VehicleType vt, Owner o
* @param tile Unused.
* @param p1 Vehicle type.
* @param p2 Unused.
+ * @param cmd Unused.
* @see CmdCreateGroup
*/
-void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
+void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
assert(p1 <= VEH_AIRCRAFT);
@@ -1063,13 +1064,14 @@ void CcCreateGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32
* @param tile Unused.
* @param p1 Unused.
* @param p2 Bit 0-19: Vehicle ID.
+ * @param cmd Unused.
*/
-void CcAddVehicleNewGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
+void CcAddVehicleNewGroup(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2, uint32 cmd)
{
if (result.Failed()) return;
assert(Vehicle::IsValidID(GB(p2, 0, 20)));
- CcCreateGroup(result, 0, Vehicle::Get(GB(p2, 0, 20))->type, 0);
+ CcCreateGroup(result, 0, Vehicle::Get(GB(p2, 0, 20))->type, 0, cmd);
}
/**