mirror of
https://github.com/monero-project/monero.git
synced 2024-12-22 19:49:30 +00:00
Merge pull request #8844
7206ef8
cryptonote_basic: fix amount overflow detection on 32-bit systems (jeffro256)
This commit is contained in:
commit
794f59b8bd
1 changed files with 1 additions and 1 deletions
|
@ -1229,7 +1229,7 @@ namespace cryptonote
|
|||
char *end = NULL;
|
||||
errno = 0;
|
||||
const unsigned long long ull = strtoull(buf, &end, 10);
|
||||
CHECK_AND_ASSERT_THROW_MES(ull != ULONG_MAX || errno == 0, "Failed to parse rounded amount: " << buf);
|
||||
CHECK_AND_ASSERT_THROW_MES(ull != ULLONG_MAX || errno == 0, "Failed to parse rounded amount: " << buf);
|
||||
CHECK_AND_ASSERT_THROW_MES(ull != 0 || amount == 0, "Overflow in rounding");
|
||||
return ull;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue