Brent Dax wrote:

Steve Fink:
#   -    memcpy(targ, ret->strstart, ret->bufused);
#   -    targ[ret->bufused + 1] = '\0';
#   +    memcpy(targ, ret->strstart, ret->strlen);
#   +    targ[ret->strlen] = '\0';

I could be wrong, but isn't strlen the length in characters rather than
the length in bytes?

Yep. But as the string is trans_coded to the default encoding, it doesn't matter. The default encoding is singlebyte.


--Brent Dax <[EMAIL PROTECTED]>
leo

Reply via email to