From bc1669b0408ebf8aa75b8af22036356bd34fd4be Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Tue, 27 Oct 2009 18:51:14 +1300 Subject: [PATCH] Author: Francesco Chemolli Bug 2794: ESI parsing fails on FreeBSD Fix bug in the ESI expression parser which prevented it from working properly on non-glibc platforms. --- src/ESIExpression.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ESIExpression.cc b/src/ESIExpression.cc index 1607a3eff4..6d370c8c7c 100644 --- a/src/ESIExpression.cc +++ b/src/ESIExpression.cc @@ -721,6 +721,7 @@ getsymbol (const char *s, char const **endptr) if ((point = strchr (s, '.')) && point - s < (ssize_t)length) { /* floating point */ + errno=0; /* reset errno */ rv.value.floating = strtod (s, &end); if (s == end || errno) { @@ -737,6 +738,7 @@ getsymbol (const char *s, char const **endptr) } } else { /* INT */ + errno=0; /* reset errno */ rv.value.integral = strtol (s, &end, 0); if (s == end || errno) { -- 2.47.2