diff --git a/include/boost/system/detail/error_code.hpp b/include/boost/system/detail/error_code.hpp index 8d3df1b..66849b4 100644 --- a/include/boost/system/detail/error_code.hpp +++ b/include/boost/system/detail/error_code.hpp @@ -139,7 +139,7 @@ public: #if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR) std::error_code const& ec = *reinterpret_cast( d2_ ); - return ec.value() + static_cast( reinterpret_cast( &ec.category() ) % 1073741789 /* 2^30-35, prime*/ ); + return ec.value() + 1000 * static_cast( reinterpret_cast( &ec.category() ) % 2097143 ); // 2^21-9, prime #else return -1;