mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-03 06:39:33 +00:00
Dolphin was crashing after attempting to use a NULL on macosx.
(turns out that passing NULL to string cmp funcs has "undefined behavior".) Thanks to Grant Paul for this quickfix!
This commit is contained in:
parent
69e8942dac
commit
9345501388
1 changed files with 2 additions and 0 deletions
|
@ -520,6 +520,8 @@ bool IsValidBluetoothName(const char* name) {
|
||||||
"Nintendo RVL-CNT-01-TR",
|
"Nintendo RVL-CNT-01-TR",
|
||||||
"Nintendo RVL-WBC-01",
|
"Nintendo RVL-WBC-01",
|
||||||
};
|
};
|
||||||
|
if (name == NULL)
|
||||||
|
return false;
|
||||||
for (size_t i = 0; i < ARRAYSIZE(kValidWiiRemoteBluetoothNames); i++)
|
for (size_t i = 0; i < ARRAYSIZE(kValidWiiRemoteBluetoothNames); i++)
|
||||||
if (strcmp(name, kValidWiiRemoteBluetoothNames[i]) == 0)
|
if (strcmp(name, kValidWiiRemoteBluetoothNames[i]) == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue