diff options
Diffstat (limited to 'src/bignum.h')
-rw-r--r-- | src/bignum.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bignum.h b/src/bignum.h index b6ae32fec1..f0971e8850 100644 --- a/src/bignum.h +++ b/src/bignum.h @@ -117,9 +117,9 @@ public: { unsigned long n = BN_get_word(this); if (!BN_is_negative(this)) - return (n > std::numeric_limits<int>::max() ? std::numeric_limits<int>::max() : n); + return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::max() : n); else - return (n > std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n); + return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n); } void setint64(int64 n) |