]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fix [] parsing.
authorToni Wilen <twilen@winuae.net>
Sat, 9 May 2020 16:58:55 +0000 (19:58 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 9 May 2020 16:58:55 +0000 (19:58 +0300)
debug.cpp

index 9ca68419a99ca913cf3333ba5aca977369a36521..5d2e11ad135f61abb74bc52cb36f181d615e3a26 100644 (file)
--- a/debug.cpp
+++ b/debug.cpp
@@ -7326,10 +7326,9 @@ static void debug_sprintf_do(uae_u32 s)
                                } else if (cn == '[') {
                                        char *next = strchr(p, ']');
                                        if (next) {
-                                               p++;
                                                *next = 0;
-                                               d = parse_custom(p, d);
-                                               p = next + 1;
+                                               d = parse_custom(p + 1, d);
+                                               p = next;
                                        }
                                } else {
                                        d[0] = '?';