Fix a stupid bug I introduced several months ago
authorEric Andersen <andersen@codepoet.org>
Fri, 8 Aug 2003 07:39:57 +0000 (07:39 -0000)
committerEric Andersen <andersen@codepoet.org>
Fri, 8 Aug 2003 07:39:57 +0000 (07:39 -0000)
coreutils/printf.c

index 28f8aa4..181c70b 100644 (file)
@@ -411,7 +411,7 @@ static unsigned long xstrtoul(char *arg)
        assert(arg!=NULL);
 
        errno = 0;
-       result = strtoul(arg, &endptr, 10);
+       result = strtoul(arg, &endptr, 0);
        if (errno != 0 || *endptr!='\0' || endptr==arg)
                fprintf(stderr, "%s", arg);
        //errno = errno_save;
@@ -427,7 +427,7 @@ static long xstrtol(char *arg)
        assert(arg!=NULL);
 
        errno = 0;
-       result = strtoul(arg, &endptr, 10);
+       result = strtoul(arg, &endptr, 0);
        if (errno != 0 || *endptr!='\0' || endptr==arg)
                fprintf(stderr, "%s", arg);
        //errno = errno_save;