if ( isendofline(*buf) || iscomment(*buf) )
break;
- n = token_hdr.ops->parse(token_p, buf, (result_buf ? result_buf+token_hdr.offset : NULL));
- if ( n < 0 )
+ if (result_buf)
+ n = token_hdr.ops->parse(token_p, buf,
+ (char *)result_buf +
+ token_hdr.offset);
+ else
+ n = token_hdr.ops->parse(token_p, buf, NULL);
+
+ if (n < 0)
break;
+
debug_printf("TK parsed (len=%d)\n", n);
i++;
buf += n;