X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcclfind.c;h=a80f15464d8c1a9bf320edfbffb13f4c512b6a77;hp=7932ecbd099a257d1c02cd69d9dc9b0f74550b7d;hb=22c55c8cd417ff79ed5a83fa00556db102fc1685;hpb=f77061f0ad18ff3a037a10ca4fcb0954e0848fa3 diff --git a/src/cclfind.c b/src/cclfind.c index 7932ecb..a80f154 100644 --- a/src/cclfind.c +++ b/src/cclfind.c @@ -385,10 +385,8 @@ static struct ccl_rpn_node *search_term_x(CCL_parser cclp, if (p->u.t.term[0] && cclp->look_token->ws_prefix_len) { - size_t len = strlen(p->u.t.term); - memcpy(p->u.t.term + len, cclp->look_token->ws_prefix_buf, - cclp->look_token->ws_prefix_len); - p->u.t.term[len + cclp->look_token->ws_prefix_len] = '\0'; + strxcat(p->u.term, cclp->look_token->ws_prefix_buf, + cclp->look_token->ws_prefix_len); } for (j = 0; j < src_len; j++) {