mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 14:24:33 +01:00
Protect against unknown ride types
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <openrct2/audio/audio.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/Editor.h>
|
||||
#include <openrct2/EditorObjectSelectionSession.h>
|
||||
#include <openrct2/Game.h>
|
||||
@@ -304,7 +305,7 @@ static bool visible_list_sort_ride_type(const list_item &a, const list_item &b)
|
||||
{
|
||||
auto rideTypeA = language_get_string(get_ride_type_string_id(a.repositoryItem));
|
||||
auto rideTypeB = language_get_string(get_ride_type_string_id(b.repositoryItem));
|
||||
sint32 result = strcmp(rideTypeA, rideTypeB);
|
||||
sint32 result = String::Compare(rideTypeA, rideTypeB);
|
||||
return result != 0 ?
|
||||
result < 0 :
|
||||
visible_list_sort_ride_name(a, b);
|
||||
|
||||
Reference in New Issue
Block a user