diff options
author | John Wiegley <johnw@newartisans.com> | 2006-03-24 01:41:22 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:31 -0400 |
commit | 44561c1c1d233d9432de319a71b44a3e05275d49 (patch) | |
tree | 3b9fa53fa4bd0e50e0890f6aafea69533e89832c /valexpr.cc | |
parent | 964e74e333cb20d3519be64f79e19224f2bcc84e (diff) | |
download | fork-ledger-44561c1c1d233d9432de319a71b44a3e05275d49.tar.gz fork-ledger-44561c1c1d233d9432de319a71b44a3e05275d49.tar.bz2 fork-ledger-44561c1c1d233d9432de319a71b44a3e05275d49.zip |
Further refinement of commodity lot information.
Diffstat (limited to 'valexpr.cc')
-rw-r--r-- | valexpr.cc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -563,7 +563,7 @@ void value_expr_t::compute(value_t& result, const details_t& details, case F_COMMODITY_MASK: assert(mask); if (details.xact) - result = mask->match(details.xact->amount.commodity().symbol()); + result = mask->match(details.xact->amount.commodity().base_symbol()); else result = false; break; @@ -895,8 +895,10 @@ value_expr_t * parse_value_term(std::istream& in, scope_t * scope, if (! def) { if (buf[1] == '\0' && (buf[0] == 'c' || buf[0] == 'C' || buf[0] == 'p' || - buf[0] == 'w' || buf[0] == 'W' || buf[0] == 'e')) + buf[0] == 'w' || buf[0] == 'W' || buf[0] == 'e')) { + in.unget(); goto find_term; + } throw new value_expr_error(std::string("Unknown identifier '") + buf + "'"); } |