From a251a1ae4e2d1ecfeecb016c125dece497e2e78d Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Sun, 19 Aug 2012 22:20:58 -0700 Subject: [PATCH] Fix STPathSet deserialization. --- src/SerializedTypes.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SerializedTypes.cpp b/src/SerializedTypes.cpp index 6e50c61fdb..2a6b0f978e 100644 --- a/src/SerializedTypes.cpp +++ b/src/SerializedTypes.cpp @@ -332,6 +332,8 @@ STPathSet* STPathSet::construct(SerializerIterator& s, const char *name) else { const bool bAccount = !!(iType & STPathElement::typeAccount); + const bool bRedeem = !!(iType & STPathElement::typeRedeem); + const bool bIssue = !!(iType & STPathElement::typeIssue); const bool bCurrency = !!(iType & STPathElement::typeCurrency); const bool bIssuer = !!(iType & STPathElement::typeIssuer); @@ -348,7 +350,7 @@ STPathSet* STPathSet::construct(SerializerIterator& s, const char *name) if (bIssuer) uIssuerID = s.get160(); - path.push_back(STPathElement(uAccountID, uCurrency, uIssuerID)); + path.push_back(STPathElement(uAccountID, uCurrency, uIssuerID, bRedeem, bIssue)); } } while(1); } @@ -361,6 +363,8 @@ bool STPathSet::isEquivalent(const SerializedType& t) const int STPathSet::getLength() const { + // XXX This code is broken? + assert(false); int ret = 0; for (std::vector::const_iterator it = value.begin(), end = value.end(); it != end; ++it)