commit b2a0362bf856138c3b78a976a2d851acfa6c8dfc Author: sin <s...@2f30.org> Date: Sun Oct 27 09:46:21 2013 +0000
Use estrtol() instead of atoi() diff --git a/seq.c b/seq.c index 4023876..5b3d5f0 100644 --- a/seq.c +++ b/seq.c @@ -98,7 +98,7 @@ digitsleft(const char *d) if(*d == '+') d++; exp = strpbrk(d, "eE"); - shift = exp ? atoi(&exp[1]) : 0; + shift = exp ? estrtol(&exp[1], 10) : 0; return MAX(0, strspn(d, "-0123456789")+shift); } @@ -110,7 +110,7 @@ digitsright(const char *d) int shift, after; exp = strpbrk(d, "eE"); - shift = exp ? atoi(&exp[1]) : 0; + shift = exp ? estrtol(&exp[1], 10) : 0; after = (d = strchr(d, '.')) ? strspn(&d[1], "0123456789") : 0; return MAX(0, after-shift);