From 9345501388ac07c8e14c02c71a3ef84836eba07f Mon Sep 17 00:00:00 2001 From: parlane Date: Mon, 19 Nov 2012 03:19:51 +0000 Subject: [PATCH] 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! --- Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp | 2 ++ 1 file changed, 2 insertions(+) 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;