diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
commit | a6f3675fc4e21b3f899286b9a02005368d913f74 (patch) | |
tree | c9bfa92b223783ff03b8e941c3bb0d36c68d3b5e /lib/search/regex.c | |
parent | Releasing progress-linux version 3:4.8.30-1~progress7.99u1. (diff) | |
download | mc-a6f3675fc4e21b3f899286b9a02005368d913f74.tar.xz mc-a6f3675fc4e21b3f899286b9a02005368d913f74.zip |
Merging upstream version 3:4.8.31.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/search/regex.c')
-rw-r--r-- | lib/search/regex.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/search/regex.c b/lib/search/regex.c index d24cf48..b1c61c5 100644 --- a/lib/search/regex.c +++ b/lib/search/regex.c @@ -2,7 +2,7 @@ Search text engine. Regex search - Copyright (C) 2009-2023 + Copyright (C) 2009-2024 Free Software Foundation, Inc. Written by: @@ -397,17 +397,16 @@ mc_search_regex__get_max_num_of_replace_tokens (const gchar * str, gsize len) { int max_token = 0; gsize loop; + for (loop = 0; loop < len - 1; loop++) - { if (str[loop] == '\\' && g_ascii_isdigit (str[loop + 1])) { if (strutils_is_char_escaped (str, &str[loop])) continue; if (max_token < str[loop + 1] - '0') max_token = str[loop + 1] - '0'; - continue; } - if (str[loop] == '$' && str[loop + 1] == '{') + else if (str[loop] == '$' && str[loop + 1] == '{') { gsize tmp_len; @@ -430,7 +429,7 @@ mc_search_regex__get_max_num_of_replace_tokens (const gchar * str, gsize len) g_free (tmp_str); } } - } + return max_token; } |