"Typo and/or thinko: scanning till the end of NUL terminated string
authorGlenn L McGrath <bug1@ihug.co.nz>
Thu, 28 Aug 2003 22:12:53 +0000 (22:12 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Thu, 28 Aug 2003 22:12:53 +0000 (22:12 -0000)
should check the byte pointed at not the pointer itself." -junkio@

miscutils/dc.c

index 5e367fe..451423c 100644 (file)
@@ -168,7 +168,7 @@ static char *get_token(char **buffer)
        while (isspace(*current)) { current++; }
        if (*current != 0) {
                start = current;
-               while (!isspace(*current) && current != 0) { current++; }
+               while (!isspace(*current) && *current != 0) { current++; }
                *buffer = current;
        }
        return start;