Fixed bug 4073 - Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace()
authorSam Lantinga <slouken@libsdl.org>
Sat, 10 Feb 2018 12:43:11 -0800
changeset 11861bd4899381cbd
parent 11860 54f9c701dc4b
child 11862 0f2ae46e429c
Fixed bug 4073 - Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace()
src/main/windows/SDL_windows_main.c
     1.1 --- a/src/main/windows/SDL_windows_main.c	Fri Feb 09 16:31:57 2018 -0800
     1.2 +++ b/src/main/windows/SDL_windows_main.c	Sat Feb 10 12:43:11 2018 -0800
     1.3 @@ -51,7 +51,7 @@
     1.4      argc = last_argc = 0;
     1.5      for (bufp = cmdline; *bufp;) {
     1.6          /* Skip leading whitespace */
     1.7 -        while (SDL_isspace(*bufp)) {
     1.8 +        while (*bufp == ' ' || *bufp == '\t') {
     1.9              ++bufp;
    1.10          }
    1.11          /* Skip over argument */
    1.12 @@ -77,7 +77,7 @@
    1.13                  ++argc;
    1.14              }
    1.15              /* Skip over word */
    1.16 -            while (*bufp && !SDL_isspace(*bufp)) {
    1.17 +            while (*bufp && (*bufp != ' ' && *bufp != '\t')) {
    1.18                  ++bufp;
    1.19              }
    1.20          }