summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mystring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mystring.c b/src/mystring.c
index 0106bd2..de624b8 100644
--- a/src/mystring.c
+++ b/src/mystring.c
@@ -125,7 +125,7 @@ intmax_t atomax(const char *s, int base)
 	errno = 0;
 	r = strtoimax(s, &p, base);
 
-	if (errno != 0)
+	if (errno == ERANGE)
 		badnum(s);
 
 	/*