]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Do not use whitespace eating functions when writing string to memory.
authorToni Wilen <twilen@winuae.net>
Fri, 31 Jan 2020 17:58:08 +0000 (19:58 +0200)
committerToni Wilen <twilen@winuae.net>
Fri, 31 Jan 2020 17:58:08 +0000 (19:58 +0200)
debug.cpp

index a1682c5323d9ffaf22d6b39c69c6df0d1d4e0621..7c61607d66cd8740496c4b90d35376d3716b87fb 100644 (file)
--- a/debug.cpp
+++ b/debug.cpp
@@ -518,19 +518,27 @@ static TCHAR readchar (TCHAR **c)
        (*c)++;
        return cc;
 }
-static TCHAR next_char (TCHAR **c)
+static TCHAR next_char(TCHAR **c)
 {
        ignore_ws (c);
        return *(*c)++;
 }
+static TCHAR next_char2(TCHAR **c)
+{
+       return *(*c)++;
+}
 static TCHAR peek_next_char (TCHAR **c)
 {
        TCHAR *pc = *c;
        return pc[1];
 }
-static int more_params (TCHAR **c)
+static int more_params(TCHAR **c)
+{
+       ignore_ws(c);
+       return (**c) != 0;
+}
+static int more_params2(TCHAR **c)
 {
-       ignore_ws (c);
        return (**c) != 0;
 }
 
@@ -3868,11 +3876,11 @@ static void writeintomem (TCHAR **c)
                uae_u32 addrb = addr;
                *c = cb;
                if (cc == '\'' || cc == '\"') {
-                       next_char (c);
-                       while (more_params (c)) {
+                       next_char2(c);
+                       while (more_params2(c)) {
                                TCHAR str[2];
                                char *astr;
-                               cc = next_char (c);
+                               cc = next_char2(c);
                                if (cc == '\'' || cc == '\"')
                                        break;
                                str[0] = cc;