summaryrefslogtreecommitdiff
path: root/walk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'walk.cc')
-rw-r--r--walk.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/walk.cc b/walk.cc
index a402ebf5..9381daa6 100644
--- a/walk.cc
+++ b/walk.cc
@@ -85,18 +85,20 @@ void truncate_entries::flush()
}
bool print = false;
- if (tailwise) {
- if (count > 0 && l - i <= count)
- print = true;
- else if (count < 0 && l - i > - count)
- print = true;
- } else {
+ if (head_count) {
if (count > 0 && i < count)
print = true;
else if (count < 0 && i >= - count)
print = true;
}
+ if (! print && tail_count) {
+ if (count > 0 && l - i <= count)
+ print = true;
+ else if (count < 0 && l - i > - count)
+ print = true;
+ }
+
if (print)
item_handler<transaction_t>::operator()(**x);
}