On Saturday 24 May 2008 09:22, Natanael Copa wrote: > Problem is in the line below here (yeah, i got tricked by it too and > assumed that the buf was big enough). It does not do what you think it > does: > > > while (*s && *s++ == '%') > > n++; > > Should be: > > while (*s) > if (*s++ == '%') > n++; Fixed, thanks. -- vda