From 74329496932dbec9ba162522c26f1b67e08bae69 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Sat, 25 Aug 2012 02:18:14 +0200 Subject: [PATCH] dinput: Fix incorrect check in device_disabled_registry. --- dlls/dinput/joystick.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c index 0f7ba196baa..8c0b5e5f9cb 100644 --- a/dlls/dinput/joystick.c +++ b/dlls/dinput/joystick.c @@ -51,8 +51,8 @@ static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(JoystickGener BOOL device_disabled_registry(const char* name) { - static const char *disabled_str = "disabled"; - static const char *joystick_key = "Joysticks"; + static const char disabled_str[] = "disabled"; + static const char joystick_key[] = "Joysticks"; char buffer[MAX_PATH]; HKEY hkey, appkey, temp; BOOL do_disable = FALSE; @@ -75,7 +75,7 @@ BOOL device_disabled_registry(const char* name) /* Look for the "controllername"="disabled" key */ if (!get_config_key(hkey, appkey, name, buffer, sizeof(buffer))) - if (!strncmp(disabled_str, buffer, sizeof(disabled_str))) + if (!strcmp(disabled_str, buffer)) { TRACE("Disabling joystick '%s' based on registry key.\n", name); do_disable = TRUE; -- 2.11.4.GIT