diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-05-18 00:01:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-05-18 00:01:40 +0200 |
commit | 9132f2ad0c064b5cebfc0e7ad562ac0cfd67a79e (patch) | |
tree | f57bccedcb71d38ca12b0f4fffea49a6f371d309 /libavutil | |
parent | 3d922c84622e7bf8603390b154630c3d62b93b12 (diff) | |
download | ffmpeg-9132f2ad0c064b5cebfc0e7ad562ac0cfd67a79e.tar.gz |
eval: opensolaris strtod() cannot handle 0x1234
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/eval.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c index 98b4e0ac52..9271fd6cbc 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -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') { |