factor shouldn't give incorrect answers for >64-bit integers.
diff --git a/toys/other/factor.c b/toys/other/factor.c
index 0e07d71..f0e69c5 100644
--- a/toys/other/factor.c
+++ b/toys/other/factor.c
@@ -29,8 +29,9 @@
     if (*s=='-') dash = *s++;
     if (!*s) return;
 
+    errno = 0;
     l = strtoull(s, &s, 0);
-    if (*s && !isspace(*s)) {
+    if (errno || (*s && !isspace(*s))) {
       error_msg("%s: not integer", err);
       while (*s && !isspace(*s)) s++;
       continue;