[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34769: Bug in emacs 26.1 gdb-send match-string applied after non-mat
From: |
Eli Zaretskii |
Subject: |
bug#34769: Bug in emacs 26.1 gdb-send match-string applied after non-matching string-match |
Date: |
Wed, 06 Mar 2019 20:18:07 +0200 |
> Date: Wed, 6 Mar 2019 12:27:03 +0100 (CET)
> From: Tobias Zawada <i_inbox@tn-home.de>
>
> At the end of gdb-send one finds the following lines:
>
> (let* ((control-command-p (string-match gdb-control-commands-regexp string))
> (command-arg (match-string 3 string))
>
> It is wrong to call (match-string 3 string) if (string-match
> gdb-control-commands-regexp string) returned nil.
> The doc of match-string says:
> "Return string of text matched by last search."
> That means match-string only returns sensible results if the last match was
> successful.
That is true, and a cleanup is a good idea. But please note that the
undefined results are not used if control-command-p is nil, so the
issue is not that serious.
Thanks.