From c822f9f0de098eb5b2033e78ac60854d50bdc60a Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Thu, 8 Oct 2009 17:59:51 +0200 Subject: [PATCH] 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/esi/Expression.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/esi/Expression.cc b/src/esi/Expression.cc index aaace55c3a..8ec3f4fdf9 100644 --- a/src/esi/Expression.cc +++ b/src/esi/Expression.cc @@ -714,6 +714,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) { @@ -730,6 +731,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.3