Merge branch 'master' into jgrpp-nrt
# Conflicts: # config.lib # src/core/bitmath_func.hpp # src/lang/korean.txt # src/main_gui.cpp # src/order_gui.cpp # src/script/api/script_object.cpp # src/station_cmd.cpp # src/video/cocoa/wnd_quartz.mm
This commit is contained in:
@@ -317,6 +317,13 @@ int MacOSStringCompare(const char *s1, const char *s2)
|
||||
CFRelease(cf2);
|
||||
});
|
||||
|
||||
/* If any CFString could not be created (e.g., due to UTF8 invalid chars), return OS unsupported functionality */
|
||||
if (cf1 == nullptr || cf2 == nullptr) {
|
||||
if (cf1 != nullptr) CFRelease(cf1);
|
||||
if (cf2 != nullptr) CFRelease(cf2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
CFComparisonResult res = CFStringCompareWithOptionsAndLocale(cf1, cf2, CFRangeMake(0, CFStringGetLength(cf1)), flags, _osx_locale);
|
||||
|
||||
return (int)res + 2;
|
||||
|
Reference in New Issue
Block a user