eval: opensolaris strtod() cannot handle 0x1234
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -75,6 +75,9 @@ double av_strtod(const char *numstr, char **tail)
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
char *next;
|
char *next;
|
||||||
|
if(numstr[0]=='0' && (numstr[1]|0x20)=='x') {
|
||||||
|
d = strtol(numstr, &next, 16);
|
||||||
|
} else
|
||||||
d = strtod(numstr, &next);
|
d = strtod(numstr, &next);
|
||||||
/* if parsing succeeded, check for and interpret postfixes */
|
/* if parsing succeeded, check for and interpret postfixes */
|
||||||
if (next!=numstr) {
|
if (next!=numstr) {
|
||||||
|
Reference in New Issue
Block a user