Merge pull request #3233 from janisozaur/fixes

Cap dropdown items count to 64
This commit is contained in:
Ted John 2016-04-03 17:08:42 +01:00
commit 49772db412
2 changed files with 3 additions and 3 deletions

View File

@ -328,7 +328,7 @@ void sub_684AC3(){
for (int j = 0; j < scenery_set->entry_count; ++j){
uint8 value = scenery_set->scenery_entries[j] & 0x1F;
RCT2_ADDRESS(0x01357BD0, uint32)[scenery_set->scenery_entries[j] >> 5] &= ~(1 << value);
RCT2_ADDRESS(0x01357BD0, uint32)[scenery_set->scenery_entries[j] >> 5] &= ~(1u << value);
}
}

View File

@ -2414,7 +2414,7 @@ static void window_ride_vehicle_mousedown(int widgetIndex, rct_window *w, rct_wi
rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideTypeIterator);
for (uint8 *currentRideEntryIndex = rideEntryIndexPtr; *currentRideEntryIndex != 0xFF; currentRideEntryIndex++) {
for (uint8 *currentRideEntryIndex = rideEntryIndexPtr; *currentRideEntryIndex != 0xFF && numItems <= 63; currentRideEntryIndex++) {
rideEntryIndex = *currentRideEntryIndex;
currentRideEntry = get_ride_entry(rideEntryIndex);
// Skip if vehicle has the same track type, but not same subtype, unless subtype switching is enabled
@ -2424,7 +2424,7 @@ static void window_ride_vehicle_mousedown(int widgetIndex, rct_window *w, rct_wi
quadIndex = rideEntryIndex >> 5;
bitIndex = rideEntryIndex & 0x1F;
// Skip if vehicle type is not invented yet
if (!(RCT2_ADDRESS(0x01357424, uint32)[quadIndex] & (1 << bitIndex)))
if (!(RCT2_ADDRESS(0x01357424, uint32)[quadIndex] & (1u << bitIndex)))
continue;
if (ride->subtype == rideEntryIndex)