]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Reset digit to 0 for inputs starting with "0x".
authorUlrich Drepper <drepper@redhat.com>
Sat, 15 Sep 2007 22:21:19 +0000 (22:21 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 15 Sep 2007 22:21:19 +0000 (22:21 +0000)
inet/inet_net.c

index e9331c59266a0207d5ec547d3c422acfd275440b..d58f1ae8e3d89bf59b347885e593a8b5f46552ec 100644 (file)
@@ -55,7 +55,7 @@ again:
        if (*cp == '0')
                digit = 1, base = 8, cp++;
        if (*cp == 'x' || *cp == 'X')
-               base = 16, cp++;
+               digit = 0, base = 16, cp++;
        while ((c = *cp) != 0) {
                if (isdigit(c)) {
                        if (base == 8 && (c == '8' || c == '9'))