mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Updated to PTR build 11655.
This commit is contained in:
parent
e73c5d3b79
commit
768772b14b
12 changed files with 23 additions and 21 deletions
|
|
@ -164,7 +164,7 @@ bool BigNumber::isZero() const
|
|||
return BN_is_zero(_bn)!=0;
|
||||
}
|
||||
|
||||
uint8 *BigNumber::AsByteArray(int minSize)
|
||||
uint8 *BigNumber::AsByteArray(int minSize, bool reverse)
|
||||
{
|
||||
int length = (minSize >= GetNumBytes()) ? minSize : GetNumBytes();
|
||||
|
||||
|
|
@ -181,7 +181,8 @@ uint8 *BigNumber::AsByteArray(int minSize)
|
|||
|
||||
BN_bn2bin(_bn, (unsigned char *)_array);
|
||||
|
||||
std::reverse(_array, _array + length);
|
||||
if (reverse)
|
||||
std::reverse(_array, _array + length);
|
||||
|
||||
return _array;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue