Fix #6376: RideCreateAction::Query ignores valid secondary colour input

This commit is contained in:
ζeh Matt 2017-10-05 20:46:50 +02:00 committed by Michael Steenbeek
parent f2195b4300
commit 0423397c34
2 changed files with 3 additions and 2 deletions

View File

@ -98,7 +98,8 @@ public:
rct_ride_entry *rideEntry = get_ride_entry(rideEntryIndex);
vehicle_colour_preset_list *presetList = rideEntry->vehicle_preset_list;
if (_colour2 >= presetList->count)
if ((presetList->count == 255 && _colour2 != 255) ||
(presetList->count != 255 && _colour2 >= presetList->count))
{
// FIXME: Add new error string.
return std::make_unique<RideCreateGameActionResult>(GA_ERROR::INVALID_PARAMETERS, STR_INVALID_RIDE_TYPE);

View File

@ -51,7 +51,7 @@ typedef struct GameAction GameAction;
// This define specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "6"
#define NETWORK_STREAM_VERSION "7"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
#ifdef __cplusplus