get_amount should return the xdata value if the EXT_COMPOUND flag is on.

This commit is contained in:
John Wiegley 2008-08-14 02:40:09 -04:00
parent 450cdb2b6d
commit 6a82e12ab4

View file

@ -83,7 +83,12 @@ namespace {
}
value_t get_amount(xact_t& xact) {
return xact.amount;
if (xact.has_xdata() &&
xact.xdata().has_flags(XACT_EXT_COMPOUND)) {
return xact.xdata().value;
} else {
return xact.amount;
}
}
value_t get_total(xact_t& xact) {