mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
tests: fix false-positive under win64
BN_ULONG isn't necessarily an unsigned long, as is the case on win64.
This commit is contained in:
parent
4b2b78b9f2
commit
63c17613ab
@ -63,11 +63,11 @@ public:
|
||||
|
||||
int getint() const
|
||||
{
|
||||
unsigned long n = BN_get_word(this);
|
||||
BN_ULONG n = BN_get_word(this);
|
||||
if (!BN_is_negative(this))
|
||||
return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::max() : n);
|
||||
return (n > (BN_ULONG)std::numeric_limits<int>::max() ? std::numeric_limits<int>::max() : n);
|
||||
else
|
||||
return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n);
|
||||
return (n > (BN_ULONG)std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n);
|
||||
}
|
||||
|
||||
void setint64(int64_t sn)
|
||||
|
Loading…
Reference in New Issue
Block a user