aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ts_bm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ts_bm.c')
-rw-r--r--lib/ts_bm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ts_bm.c b/lib/ts_bm.c
index b352903c50e3..0a22ae48af61 100644
--- a/lib/ts_bm.c
+++ b/lib/ts_bm.c
@@ -60,10 +60,12 @@ static unsigned int bm_find(struct ts_config *conf, struct ts_state *state)
struct ts_bm *bm = ts_config_priv(conf);
unsigned int i, text_len, consumed = state->offset;
const u8 *text;
- int shift = bm->patlen - 1, bs;
+ int bs;
const u8 icase = conf->flags & TS_IGNORECASE;
for (;;) {
+ int shift = bm->patlen - 1;
+
text_len = conf->get_next_block(consumed, &text, conf, state);
if (unlikely(text_len == 0))