From 1143857d7658c7c4b5fee55a5c615caf1199353d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 10 Feb 2018 12:43:11 -0800 Subject: [PATCH] Fixed bug 4073 - Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace() --- src/main/windows/SDL_windows_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/windows/SDL_windows_main.c b/src/main/windows/SDL_windows_main.c index b502ed50e..5e643a44b 100644 --- a/src/main/windows/SDL_windows_main.c +++ b/src/main/windows/SDL_windows_main.c @@ -51,7 +51,7 @@ ParseCommandLine(char *cmdline, char **argv) argc = last_argc = 0; for (bufp = cmdline; *bufp;) { /* Skip leading whitespace */ - while (SDL_isspace(*bufp)) { + while (*bufp == ' ' || *bufp == '\t') { ++bufp; } /* Skip over argument */ @@ -77,7 +77,7 @@ ParseCommandLine(char *cmdline, char **argv) ++argc; } /* Skip over word */ - while (*bufp && !SDL_isspace(*bufp)) { + while (*bufp && (*bufp != ' ' && *bufp != '\t')) { ++bufp; } }