Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -2324,10 +2324,11 @@ void *pool = objc_autoreleasePoolPush(); const char *UTF8String = self.UTF8String; char *endPointer = NULL; long long value; + errno = 0; value = strtoll(UTF8String, &endPointer, base); if ((value == LLONG_MIN || value == LLONG_MAX) && errno == ERANGE) @throw [OFOutOfRangeException exception]; @@ -2360,10 +2361,11 @@ UTF8String++; if (*UTF8String == '-') @throw [OFInvalidFormatException exception]; + errno = 0; value = strtoull(UTF8String, &endPointer, base); if (value == ULLONG_MAX && errno == ERANGE) @throw [OFOutOfRangeException exception]; @@ -2404,10 +2406,11 @@ withString: decimalPoint].UTF8String; #endif char *endPointer = NULL; float value; + errno = 0; #ifdef HAVE_STRTOF_L value = strtof_l(UTF8String, &endPointer, cLocale); #else value = strtof(UTF8String, &endPointer); #endif @@ -2452,10 +2455,11 @@ withString: decimalPoint].UTF8String; #endif char *endPointer = NULL; double value; + errno = 0; #ifdef HAVE_STRTOD_L value = strtod_l(UTF8String, &endPointer, cLocale); #else value = strtod(UTF8String, &endPointer); #endif