diff options
-rw-r--r-- | 003trace.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/003trace.cc b/003trace.cc index 7522fc90..35cb46d3 100644 --- a/003trace.cc +++ b/003trace.cc @@ -133,10 +133,11 @@ struct trace_stream { void trace_stream::newline() { if (!curr_stream) return; string curr_contents = curr_stream->str(); - if (curr_contents.empty()) return; - past_lines.push_back(trace_line(curr_depth, trim(curr_label), curr_contents)); // preserve indent in contents - if (!Hide_errors && curr_label == "error") - cerr << curr_label << ": " << curr_contents << '\n'; + if (!curr_contents.empty()) { + past_lines.push_back(trace_line(curr_depth, trim(curr_label), curr_contents)); // preserve indent in contents + if (!Hide_errors && curr_label == "error") + cerr << curr_label << ": " << curr_contents << '\n'; + } delete curr_stream; curr_stream = NULL; curr_label.clear(); |