summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorparlane <parlane@gmail.com>2012-11-19 03:19:51 +0000
committerparlane <parlane@gmail.com>2012-11-19 03:19:51 +0000
commit9345501388ac07c8e14c02c71a3ef84836eba07f (patch)
tree48e89bf7a3dc5ce99c66597513136395a85af79a /Source/Core
parent69e8942dac4e0cb819ec80462b1f267d96b3ca36 (diff)
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!
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
index 5e03e36e68..c0fe69f6bb 100644
--- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
+++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
@@ -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;