return 0;
sp_lex(sp);
- if (wrd->term_buf && wrd->term_len)
+ if (wrd->term_buf)
{
- wrd->term_buf += start;
- wrd->term_len -= start;
- if (wrd->term_len > len)
- wrd->term_len = len;
+ if (start >= wrd->term_len)
+ wrd->term_len = 0;
+ else
+ {
+ wrd->term_len -= start;
+ wrd->term_buf += start;
+
+ if (wrd->term_len > len)
+ wrd->term_len = len;
+ }
}
return 1;
}
memcpy(&wrd_tl, wrd, sizeof(*wrd));
if (tl->source)
sp_parse(sp, n, &wrd_tl, tl->source);
-
+
/* this is just the old fashioned attribute based index */
wrd_tl.index_name = tl->index_name;
if (p->flagShowRecords)