diff options
author | frsyuki <frsyuki@users.sourceforge.jp> | 2009-08-19 15:10:10 +0900 |
---|---|---|
committer | frsyuki <frsyuki@users.sourceforge.jp> | 2009-08-19 15:10:10 +0900 |
commit | b2381d0513e3ec9a874643b7faf7afeb4490a1e7 (patch) | |
tree | cf286bb4d152613e1327b1efb7e294ea3cd4cfde | |
parent | 92952f656691f5907e00c0a5ab45e3423d5429cb (diff) | |
download | msgpack-python-b2381d0513e3ec9a874643b7faf7afeb4490a1e7.tar.gz |
cpp: fix overflow check for minimum number of signed integer type
-rw-r--r-- | cpp/type/int.hpp | 2 |
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; } |