summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/type/int.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/type/int.hpp b/cpp/type/int.hpp
index 8fdc386..03500f7 100644
--- a/cpp/type/int.hpp
+++ b/cpp/type/int.hpp
@@ -37,7 +37,7 @@ namespace detail {
{ throw type_error(); }
return o.via.u64;
} else if(o.type == type::NEGATIVE_INTEGER) {
- if(o.via.i64 < (int64_t)-std::numeric_limits<T>::max())
+ if(o.via.i64 < (int64_t)std::numeric_limits<T>::min())
{ throw type_error(); }
return o.via.i64;
}