Fixed bug in brkstring(), newly introduced by the switch to strchr().
[mmh] / sbr / brkstring.c
index 68c7b70..da42d61 100644 (file)
@@ -46,7 +46,7 @@ brkstring(char *str, char *brksep, char *brkterm)
                }
 
                /* handle separators */
-               while (strchr(brksep, c = *s)) {
+               while ((c=*s) && strchr(brksep, c)) {
                        *s++ = '\0';
                }