31 Aug
2015
31 Aug
'15
3:10 a.m.
On 08/30/15 22:47, Martin Storsjo wrote:
@@ -339,6 +341,38 @@ static double strtod_helper(const char *str, char **end, MSVCRT__locale_t locale } else if(*p == '+') p++;
+#if _MSVCR_VER >= 140 + if(p[0] == '0' && tolower(p[1]) == 'x') { + char *e; + MSVCRT_long val = sign*MSVCRT_strtol(p, &e, 16); This will not work for doubles > LONG_MAX.
It will also not work if specified hexadecimal value has dot, e.g.: strtod("0x1.1p+1") = 2.125 Thanks, Piotr