From e413457a7e87939fd05c040405c380df7ce601a1 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 18 Jul 2023 22:10:44 -0700
Subject: [PATCH] Fixed clearing the mapping in testcontroller
---
src/joystick/SDL_gamepad.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/joystick/SDL_gamepad.c b/src/joystick/SDL_gamepad.c
index 901c1a4654ef..a8dbec349c8f 100644
--- a/src/joystick/SDL_gamepad.c
+++ b/src/joystick/SDL_gamepad.c
@@ -1418,9 +1418,6 @@ static char *SDL_PrivateGetGamepadMappingFromMappingString(const char *pMapping)
while (SDL_isspace(pSecondComma[1])) {
++pSecondComma;
}
- if (pSecondComma[1] == '\0') {
- return NULL;
- }
result = SDL_strdup(pSecondComma + 1); /* mapping is everything after the 3rd comma */