mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 05:35:36 +00:00
Make sure the string properties are actually strings (thanks Nat!)
This commit is contained in:
parent
c6eef542ab
commit
09b652b70a
|
@ -259,7 +259,7 @@ static int get_string_property(IOHIDDeviceRef device, CFStringRef prop, wchar_t
|
|||
|
||||
buf[0] = 0;
|
||||
|
||||
if (str) {
|
||||
if (str && CFGetTypeID(str) == CFStringGetTypeID()) {
|
||||
len --;
|
||||
|
||||
CFIndex str_len = CFStringGetLength(str);
|
||||
|
@ -298,7 +298,7 @@ static int get_string_property_utf8(IOHIDDeviceRef device, CFStringRef prop, cha
|
|||
|
||||
buf[0] = 0;
|
||||
|
||||
if (str) {
|
||||
if (str && CFGetTypeID(str) == CFStringGetTypeID()) {
|
||||
len--;
|
||||
|
||||
CFIndex str_len = CFStringGetLength(str);
|
||||
|
|
Loading…
Reference in a new issue