Browse Source

eval: opensolaris strtod() cannot handle 0x1234

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.8
Michael Niedermayer 14 years ago
parent
commit
9132f2ad0c
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavutil/eval.c

+ 4
- 1
libavutil/eval.c View File

@@ -75,7 +75,10 @@ double av_strtod(const char *numstr, char **tail)
{
double d;
char *next;
d = strtod(numstr, &next);
if(numstr[0]=='0' && (numstr[1]|0x20)=='x') {
d = strtol(numstr, &next, 16);
} else
d = strtod(numstr, &next);
/* if parsing succeeded, check for and interpret postfixes */
if (next!=numstr) {
if (*next >= 'E' && *next <= 'z') {


Loading…
Cancel
Save