mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Bugfix: Don't access elements array out of bounds.
This commit is contained in:
@@ -83,9 +83,9 @@ STAmount::STAmount(SField::ref n, const Json::Value& v)
|
||||
throw std::runtime_error("invalid amount string");
|
||||
|
||||
value = elements[0];
|
||||
if (elements.size() > 0)
|
||||
currency = elements[1];
|
||||
if (elements.size() > 1)
|
||||
currency = elements[1];
|
||||
if (elements.size() > 2)
|
||||
issuer = elements[2];
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user