about summary refs log tree commit diff stats
path: root/subx/003trace.cc
diff options
context:
space:
mode:
Diffstat (limited to 'subx/003trace.cc')
-rw-r--r--subx/003trace.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/subx/003trace.cc b/subx/003trace.cc
index e1dadaf6..590fb7fa 100644
--- a/subx/003trace.cc
+++ b/subx/003trace.cc
@@ -131,16 +131,16 @@ struct trace_line {
 
 string unescape_newline(string& s) {
   std::stringstream ss;
-  for(char c : s) {
-    if(c == '\n')
+  for (int i = 0;  i < SIZE(s);  ++i) {
+    if (s.at(i) == '\n')
       ss << "\\n";
     else
-      ss << c;
+      ss << s.at(i);
   }
   return ss.str();
 }
 
-void dump_trace_line(ostream& s, trace_line &t) {
+void dump_trace_line(ostream& s, trace_line& t) {
   s << std::setw(4) << t.depth << ' ' << t.label << ": " << unescape_newline(t.contents) << '\n';
 }