hey, thank you for the brain touch,
----- "Mathieu Bouchard" matju@artengine.ca a écrit :
On Thu, 13 May 2010, Hans-Christoph Steiner wrote:
Or maybe: binbuf_gettext(bb, &buf, &bufsize); strncat(buf, "\0", strlen(buf)-bufsize);
this is appending extra characters when [print] argument has more than seven characters.
eg:
match: bang NO_matchmÇ&: 234
strncat will copy at most strlen(buf)-bufsize, but it will also copy at most strlen("\0") bytes, and strlen("\0") is zero, because strlen actually is just
long strlen (const char *start) { const char *end = start; while (*end) end++; return end-start; }
On Fri, 14 May 2010, patko wrote:
hey, thank you for the brain touch,
excuse me : the WHAT ?
this is appending extra characters when [print] argument has more than seven characters. eg: match: bang NO_matchmÇ&: 234
Well, I hope you understand that this can happen with ANY number of characters on ANY OS, and anything else is just "luck".
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
----- "Mathieu Bouchard" matju@artengine.ca a écrit :
On Fri, 14 May 2010, patko wrote:
hey, thank you for the brain touch,
excuse me : the WHAT ?
I'm just enjoying to have people that share braincells on this topic, because I wouldn't find it by myself.