diff options
author | Burt P <pburt0@gmail.com> | 2019-12-27 21:15:59 -0600 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-12-27 22:16:36 -0800 |
commit | 50a83aeff90004aa2ec6279e60c7b8d4dec0efcf (patch) | |
tree | 17ff9c028a7d3a8e50208678312eb7c6252c387f /shell/shell.c | |
parent | bb67776e3f6c2122b02734ba39735045a1fbe6fb (diff) |
shell: fix key_mi_tag()
new flag ^ wasn't skipped
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'shell/shell.c')
-rw-r--r-- | shell/shell.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/shell.c b/shell/shell.c index 3fbf888b..09a86dae 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -2256,11 +2256,13 @@ gboolean key_value_has_vendor_string(const gchar *key) { } gchar *key_mi_tag(const gchar *key) { + static char flag_list[] = "*!^"; gchar *p = (gchar*)key, *l, *t; if (key_is_flagged(key)) { l = strchr(key+1, '$'); - while(p < l && (*p == '$' || *p == '*' || *p == '!') ) { + if (*p == '$') p++; /* skip first if exists */ + while(p < l && strchr(flag_list, *p)) { p++; } if (strlen(p)) { |