From 6a82e12ab44ce21e0c56eda728fe3cc93d84d99c Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 14 Aug 2008 02:40:09 -0400 Subject: get_amount should return the xdata value if the EXT_COMPOUND flag is on. --- src/xact.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/xact.cc') diff --git a/src/xact.cc b/src/xact.cc index 22dd1742..08089e5c 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -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) { -- cgit v1.2.3