On 7 August 2010 14:25, Rob <robpill...@gmail.com> wrote: > Uh, in tokenise, shouldn't > strncpy(tmp, pat, strlen(pat)); > be > strncpy(tmp, pat, sizeof tmp); ?
we only tokenise text, so it can simplify to: unsigned int tokenize(char **tok) { unsigned int i = 0; char tmp[sizeof text] = {0}; strcpy(tmp, text); I also corrected the size_t len, tokencnt = 0; mistake (tokencnt wanted to be an unsigned int). new patch: http://pastebin.com/raw.php?i=C82sS3U7 Just to make clear, this patch is an updated version of the one here: http://tools.suckless.org/dmenu/patches/xmms-like_pattern_matching