From 117cf3454c4978907eb041e83c01b67a2327a727 Mon Sep 17 00:00:00 2001 From: martinghunt Date: Mon, 7 Apr 2014 09:59:27 +0100 Subject: [PATCH] Fix when line of dashes written in human readable output --- assembly-stats.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/assembly-stats.cpp b/assembly-stats.cpp index a6a985f..3237e58 100644 --- a/assembly-stats.cpp +++ b/assembly-stats.cpp @@ -29,17 +29,25 @@ int main(int argc, char* argv[]) for (int i = ops.infileStartIndex; i < argc; i++) { Stats s(argv[i], ops.minLength); + if (ops.outFormat == FORMAT_HUMAN) + { + if (first) + { + first = false; + } + else + { + cout << string(79, '-') << endl; + } + } + cout << s.toString(ops.outFormat); + if (ops.outFormat == FORMAT_TAB) { ops.outFormat = FORMAT_TAB_NO_HEAD; } - if (ops.outFormat == FORMAT_HUMAN && first) - { - cout << string(79, '-') << endl; - first = false; - } } return 0;