chiark / gitweb /
util: fix handling of unknown escapes in cunescape()
[elogind.git] / src / util.c
index 8360eb68fd435244a976981c9a4e15a5618053df..78eb728121a3423aeb651c8682fa5a8a52728b18 100644 (file)
@@ -1212,7 +1212,7 @@ char *cunescape(const char *s) {
                 default:
                         /* Invalid escape code, let's take it literal then */
                         *(t++) = '\\';
                 default:
                         /* Invalid escape code, let's take it literal then */
                         *(t++) = '\\';
-                        *(t++) = 'f';
+                        *(t++) = *f;
                         break;
                 }
         }
                         break;
                 }
         }