Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
Parlane committed Nov 19, 2012
1 parent 69e8942 commit 9345501
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
Expand Up @@ -520,6 +520,8 @@ bool IsValidBluetoothName(const char* name) {
"Nintendo RVL-CNT-01-TR",
"Nintendo RVL-WBC-01",
};
if (name == NULL)
return false;
for (size_t i = 0; i < ARRAYSIZE(kValidWiiRemoteBluetoothNames); i++)
if (strcmp(name, kValidWiiRemoteBluetoothNames[i]) == 0)
return true;
Expand Down

0 comments on commit 9345501

Please sign in to comment.