summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/strtoimax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib/strtoimax.c')
-rw-r--r--src/lib/libc/stdlib/strtoimax.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/strtoimax.c b/src/lib/libc/stdlib/strtoimax.c
index 52403a7213..74e355626a 100644
--- a/src/lib/libc/stdlib/strtoimax.c
+++ b/src/lib/libc/stdlib/strtoimax.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strtoimax.c,v 1.3 2015/09/12 16:23:14 guenther Exp $ */ 1/* $OpenBSD: strtoimax.c,v 1.4 2017/07/06 16:23:11 millert Exp $ */
2/* 2/*
3 * Copyright (c) 1992 The Regents of the University of California. 3 * Copyright (c) 1992 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -74,8 +74,8 @@ strtoimax(const char *nptr, char **endptr, int base)
74 if (c == '+') 74 if (c == '+')
75 c = *s++; 75 c = *s++;
76 } 76 }
77 if ((base == 0 || base == 16) && 77 if ((base == 0 || base == 16) && c == '0' &&
78 c == '0' && (*s == 'x' || *s == 'X')) { 78 (*s == 'x' || *s == 'X') && isxdigit((unsigned char)s[1])) {
79 c = s[1]; 79 c = s[1];
80 s += 2; 80 s += 2;
81 base = 16; 81 base = 16;