/* CCL find (to rpn conversion)
* Europagate, 1995
*
- * $Id: cclfind.c,v 1.1 2003-10-27 12:21:30 adam Exp $
+ * $Id: cclfind.c,v 1.3 2004-08-11 20:13:36 adam Exp $
*
* Old Europagate log:
*
else
add_attr_numeric (p, attset, CCL_BIB1_STR, 1);
}
-
+
/* make the RPN token */
p->u.t.term = (char *)xmalloc (len);
ccl_assert (p->u.t.term);
src_len--;
src_str++;
}
- else if (i == no-1 && right_trunc)
+ if (i == no-1 && right_trunc)
src_len--;
if (src_len)
{
/* ! word order specified */
/* % word order not specified */
p_prox = mk_node(CCL_RPN_TERM);
- p_prox->u.t.term = (char *) xmalloc(cclp->look_token->len);
+ p_prox->u.t.term = (char *) xmalloc(1 + cclp->look_token->len);
memcpy(p_prox->u.t.term, cclp->look_token->name,
cclp->look_token->len);
p_prox->u.t.term[cclp->look_token->len] = 0;