Don't allow a SerializerIterator to bind to a temporary Serializer. This was causing a bunch

of deserialization bugs.
This commit is contained in:
JoelKatz
2012-10-17 06:07:18 -07:00
parent a568f6ff26
commit 305b037f59
6 changed files with 18 additions and 15 deletions

View File

@@ -21,7 +21,7 @@ SerializedLedgerEntry::SerializedLedgerEntry(SerializerIterator& sit, const uint
SerializedLedgerEntry::SerializedLedgerEntry(const Serializer& s, const uint256& index)
: STObject(sfLedgerEntry), mIndex(index)
{
SerializerIterator sit(s);
SerializerIterator sit(const_cast<Serializer&>(s)); // we know 's' isn't going away
set(sit);
uint16 type = getFieldU16(sfLedgerEntryType);