diff --git a/src/conf.c b/src/conf.c index 2f7850c..d754351 100644 --- a/src/conf.c +++ b/src/conf.c @@ -209,6 +209,8 @@ int patty_conf_read(const char *path, lineno = 1, column = 0; + uint8_t last = '\0'; + if (file_read(&file, path) < 0) { goto error_file_read; } @@ -321,9 +323,11 @@ int patty_conf_read(const char *path, } } - if (escape == ESCAPE_ON) { + if (escape == ESCAPE_ON && last == '\\') { escape = ESCAPE_OFF; } + + last = c; } if (token.len) {