Accept a leading sign character in _cairo_strtod.

This commit is contained in:
Jonathan Kew 2021-07-20 17:46:01 +01:00
parent 06f405c775
commit b7d67433b7

View file

@ -862,6 +862,8 @@ _cairo_strtod (const char *nptr, char **endptr)
bufptr += decimal_point_len;
delta -= decimal_point_len - 1;
have_dp = TRUE;
} else if (bufptr == buf && (*p == '-' || *p == '+')) {
*bufptr++ = *p;
} else {
break;
}