changeset 679:4960c858fff5

Common: change escape sequence to avoid warning
author David Demelier <markand@malikania.fr>
date Thu, 12 Apr 2018 20:30:30 +0200
parents a4082de4e94e
children 900ca2f95838
files libcommon/irccd/string_util.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libcommon/irccd/string_util.cpp	Thu Apr 12 20:14:07 2018 +0200
+++ b/libcommon/irccd/string_util.cpp	Thu Apr 12 20:30:30 2018 +0200
@@ -184,7 +184,7 @@
     auto list = split(content, ",");
 
     if (list.empty())
-        return "";
+        return "\033[0m";
     if (list.size() > 3)
         return "";
 
@@ -193,7 +193,7 @@
     /*
      * Shell sequence looks like this:
      *
-     * ttributes;foreground;backgroundm
+     * ^[[attributes;foreground;backgroundm
      */
     if (list.size() >= 3) {
         const auto it = shell_attributes.find(list[2]);
@@ -222,7 +222,7 @@
 
     std::ostringstream oss;
 
-    oss << "[";
+    oss << "\033[";
     oss << string_util::join(seq, ';');
     oss << "m";