On 10/17/07, Frank Richter <[EMAIL PROTECTED]> wrote: > On 17.10.2007 06:49, Nigel Liang wrote: > > Hi, > > > > strchrW assumes a NULL-terminated string. May crash if terminating > > character is > > not found. memchrW is better because you can specify the maximum number of > > bytes to search. > > On the flipside, memchrW() doesn't stop at a NUL...
Ops! Please ignore this patch, the bounds of the memchr are way off... Curiously, this did not crash on any of the tests I run even though it is always going past the string boundary. On the other hand, using strchrW would reliably crash after roughly 10 minutes of activity...