From e955bde7ebfd07f02aa9c5c4302a20ec3e01d934 Mon Sep 17 00:00:00 2001 From: ritt Date: Tue, 11 Feb 2020 12:53:04 +0100 Subject: [PATCH] Fixed bug in conditional attribute processing in find form --- src/elogd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/elogd.c b/src/elogd.c index c5412f5c..c50d20da 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -9351,6 +9351,10 @@ void attrib_from_param(int n_attr, char attrib[MAX_N_ATTR][NAME_LENGTH]) { strlcpy(attrib[i], getparam(ua), NAME_LENGTH); else attrib[i][0] = 0; + if (attrib[i][0] == '^' && attrib[i][strlen(attrib[i])-1] == '$') { + memmove(&attrib[i][0], &attrib[i][1], strlen(attrib[i])); + attrib[i][strlen(attrib[i])-1] = 0; + } } } } @@ -12468,7 +12472,7 @@ void show_find_form(LOGBOOK *lbs) { } } - /* display check boxes (or'ed) */ + /* display check boxes (or'ed) */ else if (attr_flags[i] & AF_MULTI) { for (j = 0; j < MAX_N_LIST && attr_options[i][j][0]; j++) { sprintf(str, "%s_%d", attr_list[i], j);