diff --git a/include/boost/system/detail/error_code.hpp b/include/boost/system/detail/error_code.hpp index 5cba48d..5756c8d 100644 --- a/include/boost/system/detail/error_code.hpp +++ b/include/boost/system/detail/error_code.hpp @@ -105,7 +105,7 @@ public: } error_code( int val, const error_category & cat, source_location const * loc ) BOOST_NOEXCEPT: - d1_(), lc_flags_( reinterpret_cast( loc ) | +detail::failed_impl( val, cat ) ) + d1_(), lc_flags_( ( loc? reinterpret_cast( loc ): 2 ) | +detail::failed_impl( val, cat ) ) { d1_.val_ = val; d1_.cat_ = &cat;