diff --git a/src/openrct2/actions/LandRaiseAction.cpp b/src/openrct2/actions/LandRaiseAction.cpp index 5f78121871..2fdd40e293 100644 --- a/src/openrct2/actions/LandRaiseAction.cpp +++ b/src/openrct2/actions/LandRaiseAction.cpp @@ -110,8 +110,16 @@ GameActions::Result LandRaiseAction::QueryExecute(bool isExecuting) const uint8_t currentSlope = surfaceElement->GetSlope(); uint8_t newSlope = tile_element_raise_styles[tableRow][currentSlope]; if (newSlope & SURFACE_STYLE_FLAG_RAISE_OR_LOWER_BASE_HEIGHT) - height += 2; - + { + if (height + 2 > UINT8_MAX) + { + height = UINT8_MAX; + } + else + { + height += 2; + } + } newSlope &= TILE_ELEMENT_SURFACE_SLOPE_MASK; auto landSetHeightAction = LandSetHeightAction({ x, y }, height, newSlope); diff --git a/src/openrct2/actions/WaterRaiseAction.cpp b/src/openrct2/actions/WaterRaiseAction.cpp index a94e716664..2da3654222 100644 --- a/src/openrct2/actions/WaterRaiseAction.cpp +++ b/src/openrct2/actions/WaterRaiseAction.cpp @@ -94,7 +94,14 @@ GameActions::Result WaterRaiseAction::QueryExecute(bool isExecuting) const { if (height > maxHeight) continue; - height += 2; + if (height + 2 > UINT8_MAX) + { + height = UINT8_MAX; + } + else + { + height += 2; + } } else { diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 670e3f58f5..d9c82ad5ff 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -43,7 +43,7 @@ // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "18" +#define NETWORK_STREAM_VERSION "19" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION