diff options
Diffstat (limited to 'csv.cc')
-rw-r--r-- | csv.cc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6,12 +6,12 @@ namespace { inline void write_escaped_string(std::ostream& out, const string& xact) { out << "\""; - for (string::const_iterator i = xact.begin(); i != xact.end(); i++) - if (*i == '"') { + foreach (char ch, xact) + if (ch == '"') { out << "\\"; out << "\""; } else { - out << *i; + out << ch; } out << "\""; } |