From 6d020a9b0ba2f20054de529f0183d23afdf32972 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 14 Sep 2008 19:40:26 -0400 Subject: format_t now handles escaped characters in input strings. --- src/format.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/format.cc b/src/format.cc index fc588c9b..3b3c562a 100644 --- a/src/format.cc +++ b/src/format.cc @@ -159,6 +159,8 @@ format_t::element_t * format_t::parse_elements(const string& fmt) case 'r': current->chars = "\r"; break; case 't': current->chars = "\t"; break; case 'v': current->chars = "\v"; break; + case '\\': current->chars = "\\"; break; + default: current->chars = string(1, *p); break; } continue; } -- cgit v1.2.3