summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2018-07-21 00:18:52 +0200
committerpgen <p.gen.progs@gmail.com>2018-07-21 18:21:55 +0200
commita35fa5b4fa5915614357b0c6e90f9ba0eed1cb02 (patch)
tree90edf546e3eae74473d2c136af5b9d7e5bb7a0e8
parentfafa1f37e9f5d257ab5f8cb7251142e209f0385f (diff)
Fix the fuzzy bitmap cleaning mechanism
-rw-r--r--smenu.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/smenu.c b/smenu.c
index f5f50af..5a0621a 100644
--- a/smenu.c
+++ b/smenu.c
@@ -11582,7 +11582,14 @@ main(int argc, char * argv[])
search_data.len = 0;
for (i = 0; i < matches_count; i++)
- word_a[matching_words_a[i]].is_matching = 0;
+ {
+ long n = matching_words_a[i];
+
+ word_a[n].is_matching = 0;
+
+ memset(word_a[n].bitmap, '\0',
+ (word_a[n].mb - 1 - daccess.flength) / CHAR_BIT + 1);
+ }
matches_count = 0;
@@ -11741,7 +11748,14 @@ main(int argc, char * argv[])
/* zero previous matching indicators */
/* """"""""""""""""""""""""""""""""" */
for (i = 0; i < matches_count; i++)
- word_a[matching_words_a[i]].is_matching = 0;
+ {
+ long n = matching_words_a[i];
+
+ word_a[n].is_matching = 0;
+
+ memset(word_a[n].bitmap, '\0',
+ (word_a[n].mb - 1 - daccess.flength) / CHAR_BIT + 1);
+ }
matches_count = 0;
@@ -11885,6 +11899,7 @@ main(int argc, char * argv[])
long n = matching_words_a[i];
word_a[n].is_matching = 0;
+
memset(word_a[n].bitmap, '\0',
(word_a[n].mb - 1 - daccess.flength) / CHAR_BIT + 1);
}