diff options
-rw-r--r-- | sway/config.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c index daaedeed..4636cff6 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -278,8 +278,9 @@ char *do_var_replacement(char *str) { | |||
278 | char *find = str; | 278 | char *find = str; |
279 | while ((find = strchr(find, '$'))) { | 279 | while ((find = strchr(find, '$'))) { |
280 | // Skip if escaped. | 280 | // Skip if escaped. |
281 | if (find > str + 1 && find[-1] == '\\') { | 281 | if (find > str && find[-1] == '\\') { |
282 | if (!(find > str + 2 && find[-2] == '\\')) { | 282 | if (find == str + 1 || !(find > str + 1 && find[-2] == '\\')) { |
283 | ++find; | ||
283 | continue; | 284 | continue; |
284 | } | 285 | } |
285 | } | 286 | } |