diff --git a/lib/search/regex.c b/lib/search/regex.c
index 32be35319..5443ec39b 100644
a
|
b
|
mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data, |
902 | 902 | { |
903 | 903 | while (TRUE) |
904 | 904 | { |
905 | | int current_chr = '\n'; /* stop search symbol */ |
| 905 | int current_chr = '\0'; /* stop search symbol */ |
906 | 906 | |
907 | 907 | ret = lc_mc_search->search_fn (user_data, current_pos, ¤t_chr); |
908 | 908 | |
… |
… |
mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data, |
921 | 921 | |
922 | 922 | g_string_append_c (lc_mc_search->regex_buffer, (char) current_chr); |
923 | 923 | |
924 | | if ((char) current_chr == '\n' || virtual_pos > end_search) |
| 924 | if ((char) current_chr == '\0' || virtual_pos >= end_search) |
925 | 925 | break; |
926 | 926 | } |
927 | 927 | } |
… |
… |
mc_search__run_regex (mc_search_t * lc_mc_search, const void *user_data, |
940 | 940 | |
941 | 941 | current_pos++; |
942 | 942 | |
943 | | if (current_chr == '\n' || current_pos > end_search) |
| 943 | if (current_pos >= end_search) |
944 | 944 | break; |
945 | 945 | } |
946 | 946 | |