mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
cpp: fix overflow check for minimum number of signed integer type
This commit is contained in:
parent
92952f6566
commit
b2381d0513
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue