Message ID | 20210406084306.GA14812@delia |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c index 65b300cb008..163552aede4 100644 --- a/gdb/tui/tui-disasm.c +++ b/gdb/tui/tui-disasm.c @@ -61,7 +61,7 @@ len_without_escapes (const std::string &str) const char *ptr = str.c_str (); char c; - while ((c = *ptr++) != '\0') + while ((c = *ptr) != '\0') { if (c == '\033') { @@ -77,7 +77,10 @@ len_without_escapes (const std::string &str) } } else - ++len; + { + ++len; + ++ptr; + } } return len; }