summaryrefslogtreecommitdiff
path: root/libc/stdlib/strto_l.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/strto_l.c')
-rw-r--r--libc/stdlib/strto_l.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/stdlib/strto_l.c b/libc/stdlib/strto_l.c
index a83cf4095..16b29f5d6 100644
--- a/libc/stdlib/strto_l.c
+++ b/libc/stdlib/strto_l.c
@@ -15,7 +15,7 @@
/* OPTIONS */
/*****************************************************************************/
-/* Set if we want strtod to set errno appropriately. */
+/* Set if we want errno set appropriately. */
/* NOTE: Implies _STRTO_ENDPTR below */
#define _STRTO_ERRNO 0
@@ -107,8 +107,8 @@ unsigned long _strto_l(const char *str, char **endptr, int base, int uflag)
goto DONE;
}
+ cutoff_digit = ULONG_MAX % base;
cutoff = ULONG_MAX / base;
- cutoff_digit = ULONG_MAX - cutoff * base;
while (1) {
digit = 40;