From b2a0362bf856138c3b78a976a2d851acfa6c8dfc Mon Sep 17 00:00:00 2001 From: sin Date: Sun, 27 Oct 2013 09:46:21 +0000 Subject: [PATCH] Use estrtol() instead of atoi() --- seq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);