public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug tui/27680] ui-style.c:243: internal-error: bool ui_file_style::parse(const char*, size_t*): Assertion `match == 0' failed.' Date: Thu, 01 Apr 2021 13:44:37 +0000 [thread overview] Message-ID: <bug-27680-4717-FsyswveiJw@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-27680-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=27680 --- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Tom Tromey from comment #7) > The code in the loop isn't expecting the ++ in the loop header. > The else clause also has this same bug: > > else > { > /* Shouldn't happen, but just skip the ESC if it somehow > does. */ > ++ptr; > } OK, then: ... 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; } ... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-04-01 13:44 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-01 9:09 [Bug tui/27680] New: " vries at gcc dot gnu.org 2021-04-01 9:12 ` [Bug tui/27680] " vries at gcc dot gnu.org 2021-04-01 9:13 ` vries at gcc dot gnu.org 2021-04-01 9:20 ` vries at gcc dot gnu.org 2021-04-01 9:26 ` vries at gcc dot gnu.org 2021-04-01 9:27 ` vries at gcc dot gnu.org 2021-04-01 9:43 ` vries at gcc dot gnu.org 2021-04-01 12:55 ` tromey at sourceware dot org 2021-04-01 13:44 ` vries at gcc dot gnu.org [this message] 2021-04-01 13:49 ` tromey at sourceware dot org 2021-04-06 8:40 ` cvs-commit at gcc dot gnu.org 2021-04-06 8:42 ` vries at gcc dot gnu.org 2021-05-01 11:00 ` stefan.bruens@rwth-aachen.de 2021-05-03 7:57 ` vries at gcc dot gnu.org 2021-05-03 12:48 ` vries at gcc dot gnu.org 2021-05-05 21:13 ` vries at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-27680-4717-FsyswveiJw@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).