From 9132f2ad0c064b5cebfc0e7ad562ac0cfd67a79e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 18 May 2011 00:01:40 +0200 Subject: [PATCH] eval: opensolaris strtod() cannot handle 0x1234 Signed-off-by: Michael Niedermayer --- libavutil/eval.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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') {