From a68615fc76bd178907531d0d9e837f3aca9d8bae Mon Sep 17 00:00:00 2001 From: Burt P Date: Sat, 13 Jul 2019 12:46:11 -0500 Subject: shell.c: small fix for label Signed-off-by: Burt P --- shell/shell.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/shell.c b/shell/shell.c index 48745f6b..a8d2c926 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -1537,7 +1537,7 @@ static void module_selected_show_info_detail(GKeyFile *key_file, for (j = 0; keys[j]; j++) { gchar *key_markup; gchar *value; - gchar *name = NULL, *label = NULL, *tag = NULL; + gchar *name, *label, *tag; key_get_components(keys[j], NULL, &tag, &name, &label, NULL, TRUE); value = g_key_file_get_value(key_file, groups[i], keys[j], NULL); @@ -2220,6 +2220,8 @@ void key_get_components(const gchar *key, if (label) { *label = g_strdup(np); gchar *lbp = g_utf8_strchr(*label, -1, '#'); + if (lbp) + *lbp = 0; if (lbp && dis) *dis = g_strdup(lbp + 1); } -- cgit v1.2.3