mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Fix #23985: Crash when opening New Ride menu
This commit is contained in:
committed by
GitHub
parent
0382973afe
commit
113928a251
@@ -281,9 +281,9 @@ namespace OpenRCT2::Ui::Windows
|
||||
RideSelection _windowNewRideListItems[RideListItemsMax]{};
|
||||
struct NewRideVariables
|
||||
{
|
||||
RideSelection SelectedRide;
|
||||
RideSelection HighlightedRide;
|
||||
uint16_t SelectedRideCountdown;
|
||||
RideSelection SelectedRide{};
|
||||
RideSelection HighlightedRide{};
|
||||
uint16_t SelectedRideCountdown{};
|
||||
} _newRideVars{};
|
||||
|
||||
public:
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
// Set to 255 on all tracked ride entries
|
||||
static uint8_t constexpr kNoFlatRideCars = 0xFF;
|
||||
static ride_type_t constexpr kRideTypeNull = 0xFF;
|
||||
|
||||
struct RideNaming
|
||||
{
|
||||
|
||||
@@ -19,14 +19,15 @@
|
||||
struct Ride;
|
||||
|
||||
using ride_type_t = uint16_t;
|
||||
static ride_type_t constexpr kRideTypeNull = 0xFF;
|
||||
|
||||
/**
|
||||
* Couples a ride type and subtype together.
|
||||
*/
|
||||
struct RideSelection
|
||||
{
|
||||
ride_type_t Type;
|
||||
ObjectEntryIndex EntryIndex;
|
||||
ride_type_t Type = kRideTypeNull;
|
||||
ObjectEntryIndex EntryIndex = kObjectEntryIndexNull;
|
||||
|
||||
bool operator==(const RideSelection& other) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user