From: Christian Groessler Date: Thu, 12 Sep 2013 10:38:20 +0000 (+0200) Subject: Fix strtol 'endptr' return value. X-Git-Tag: V2.15~229^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F39%2Fhead;p=cc65 Fix strtol 'endptr' return value. --- diff --git a/libsrc/common/strtol.c b/libsrc/common/strtol.c index b7ccdf24c..f3ce08a35 100644 --- a/libsrc/common/strtol.c +++ b/libsrc/common/strtol.c @@ -102,7 +102,7 @@ long __fastcall__ strtol (const char* nptr, char** endptr, int base) */ if (endptr) { if (CvtCount > 0) { - *endptr = (char*) S - 1; + *endptr = (char*) S; } else { *endptr = (char*) nptr; }