X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fts_bm.c;h=4a7fce72898ed40f13d58bca7cc1d97293d8bba0;hb=48948a3e237ff47823d414704aeb8604a4c61ad0;hp=d90822c378a48af52878f41e5db18858496fddb9;hpb=23e735bc7b0e1d614656881794257b4224efda3a;p=linux-2.6 diff --git a/lib/ts_bm.c b/lib/ts_bm.c index d90822c378..4a7fce7289 100644 --- a/lib/ts_bm.c +++ b/lib/ts_bm.c @@ -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); unsigned int i, text_len, consumed = state->offset; const u8 *text; - int shift = bm->patlen, bs; + int shift = bm->patlen - 1, bs; for (;;) { text_len = conf->get_next_block(consumed, &text, conf, state);