From b96ed7b984852d7d8922bcd0b0af1b2a05e2c825 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 28 May 2005 12:10:33 +0000 Subject: [PATCH] Check errno after calling frexp - this is pretty slow and unecessary on most platforms, but this close to release it seems better to be over cautious. [SVN r29255] --- include/boost/functional/hash/hash.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/functional/hash/hash.hpp b/include/boost/functional/hash/hash.hpp index 81ff1dd..0ff794e 100644 --- a/include/boost/functional/hash/hash.hpp +++ b/include/boost/functional/hash/hash.hpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -264,7 +265,9 @@ namespace boost inline std::size_t float_hash_value(T v) { int exp = 0; + errno = 0; v = boost::hash_detail::call_frexp(v, &exp); + if(errno) return 0; std::size_t seed = 0;