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