src/hb-common.cc: Fix build on older Visual Studio

Visual Studio only supported strtof() from Visual Studio 2013 onwards, so
use strtod() instead to do the operation, which should do the same thing,
sans going to a double, not a float.
This commit is contained in:
Chun-wei Fan 2017-02-24 17:58:25 +08:00 committed by Khaled Hosny
parent b90fb83ea6
commit 539571c1a9
1 changed files with 4 additions and 0 deletions

View File

@ -667,7 +667,11 @@ parse_float (const char **pp, const char *end, float *pv)
float v;
errno = 0;
#if defined (_MSC_VER) && (_MSC_VER < 1800)
v = strtod (p, &pend);
#else
v = strtof (p, &pend);
#endif
if (errno || p == pend)
return false;