summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-16 02:51:09 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-16 02:51:09 -0400
commitb5a972d1a0b12bb55f16af9f57166a779823bc7f (patch)
treea6bd49bdfb7a31994be53db9a83d407418995ce1
parente3b40f5bb68bffd63656f6fcbbff88682dbb1eed (diff)
downloadfork-ledger-b5a972d1a0b12bb55f16af9f57166a779823bc7f.tar.gz
fork-ledger-b5a972d1a0b12bb55f16af9f57166a779823bc7f.tar.bz2
fork-ledger-b5a972d1a0b12bb55f16af9f57166a779823bc7f.zip
The -n option for bal command is working again
The fix was that when appending new predicates, enclosed both sides of the AND with parentheses.
-rw-r--r--src/report.cc2
-rw-r--r--src/report.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/report.cc b/src/report.cc
index 837a1fb4..b0281c3e 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -271,7 +271,7 @@ namespace {
value_t operator()(call_scope_t& args)
{
- if (args.value().size() > 0) {
+ if (args.size() > 0) {
report.HANDLER(limit_).append
(args_to_predicate_expr(args.value().as_sequence().begin(),
args.value().as_sequence().end()));
diff --git a/src/report.h b/src/report.h
index 809d0f5b..2007d29c 100644
--- a/src/report.h
+++ b/src/report.h
@@ -278,7 +278,7 @@ public:
if (! handled)
on(text);
else
- on(string("(") + str() + ")&" + text);
+ on(string("(") + str() + ")&(" + text + ")");
}
DO_(args) {
append(args[0].to_string());
@@ -345,7 +345,7 @@ public:
if (! handled)
on(text);
else
- on(string("(") + str() + ")&" + text);
+ on(string("(") + str() + ")&(" + text + ")");
}
DO_(args) {
append(args[0].to_string());
@@ -373,7 +373,7 @@ public:
if (! handled)
on(text);
else
- on(string("(") + str() + ")&" + text);
+ on(string("(") + str() + ")&(" + text + ")");
}
DO_(args) {
append(args[0].to_string());