Compare commits

...

1 Commits

Author SHA1 Message Date
Ed Hennis
335b9becd7 MPTTester::operator() parameter should be std::int64_t
- Originally defined as uint64_t, but the testIssuerLoan() test called
  it with a negative number, causing an overflow to a very large number
  that in some circumstances could be silently cast back to an int64_t,
  but might not be. I believe this is UB, and we don't want to rely on
  that.
2025-12-02 22:56:19 -05:00
2 changed files with 2 additions and 2 deletions

View File

@@ -644,7 +644,7 @@ MPTTester::operator[](std::string const& name) const
}
PrettyAmount
MPTTester::operator()(std::uint64_t amount) const
MPTTester::operator()(std::int64_t amount) const
{
return MPT("", issuanceID())(amount);
}

View File

@@ -272,7 +272,7 @@ public:
operator[](std::string const& name) const;
PrettyAmount
operator()(std::uint64_t amount) const;
operator()(std::int64_t amount) const;
operator Asset() const;