|
@@ -63,7 +63,7 @@ static unsigned int bm_find(struct ts_config *conf, struct ts_state *state)
|
|
struct ts_bm *bm = ts_config_priv(conf);
|
|
struct ts_bm *bm = ts_config_priv(conf);
|
|
unsigned int i, text_len, consumed = state->offset;
|
|
unsigned int i, text_len, consumed = state->offset;
|
|
const u8 *text;
|
|
const u8 *text;
|
|
- int shift = bm->patlen, bs;
|
|
|
|
|
|
+ int shift = bm->patlen - 1, bs;
|
|
|
|
|
|
for (;;) {
|
|
for (;;) {
|
|
text_len = conf->get_next_block(consumed, &text, conf, state);
|
|
text_len = conf->get_next_block(consumed, &text, conf, state);
|