X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=dict%2Flookgrep.c;h=f480029246c1471b44d22817569a1f32f3358dbf;hb=f31b347624a0c696df1945e4f88725d1e01eb8f9;hp=fba076f0a464864fa5764e9aaf9abcd3d89f77e8;hpb=a030c87bc444608639905eca95e29f84a4f1d991;p=idzebra-moved-to-github.git diff --git a/dict/lookgrep.c b/dict/lookgrep.c index fba076f..f480029 100644 --- a/dict/lookgrep.c +++ b/dict/lookgrep.c @@ -19,6 +19,9 @@ +#if HAVE_CONFIG_H +#include +#endif #include #include #include @@ -409,7 +412,7 @@ int dict_lookup_grep(Dict dict, const char *pattern, int range, void *client, mc = mk_MatchContext(dfa, range); - Rj = (MatchWord *) xcalloc((MAX_LENGTH+1) * mc->n, sizeof(*Rj)); + Rj = (MatchWord *) xcalloc((MAX_LENGTH+2) * mc->fact, sizeof(*Rj)); set_bit (mc, Rj, 0, 0); for (d = 1; d<=mc->range; d++)