[Commits] SDL: Fixed bug 4073 - Unquoted Unicode argument parsing broken o...

libsdl.org revision control commits-owner at libsdl.org
Sat Feb 10 12:43:42 PST 2018


details:   https://hg.libsdl.org/SDL/rev/bd4899381cbd
changeset: 11861:bd4899381cbd
user:      Sam Lantinga <slouken at libsdl.org>
date:      Sat Feb 10 12:43:11 2018 -0800
description:
Fixed bug 4073 - Unquoted Unicode argument parsing broken on Windows due to incorrect usage of SDL_isspace()

diffstat:

 src/main/windows/SDL_windows_main.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 54f9c701dc4b -r bd4899381cbd src/main/windows/SDL_windows_main.c
--- a/src/main/windows/SDL_windows_main.c	Fri Feb 09 16:31:57 2018 -0800
+++ b/src/main/windows/SDL_windows_main.c	Sat Feb 10 12:43:11 2018 -0800
@@ -51,7 +51,7 @@
     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 @@
                 ++argc;
             }
             /* Skip over word */
-            while (*bufp && !SDL_isspace(*bufp)) {
+            while (*bufp && (*bufp != ' ' && *bufp != '\t')) {
                 ++bufp;
             }
         }


More information about the commits mailing list