diff options
author | 2015-09-08 09:10:36 -0700 | |
---|---|---|
committer | 2015-09-08 09:10:36 -0700 | |
commit | da76ecb5f8bb0e0d9aeb31e39391ca5d361fa619 (patch) | |
tree | f5355b9fe8e5ad20933741cea0f6631250e5b893 /sway | |
parent | set variable changes (diff) | |
download | sway-da76ecb5f8bb0e0d9aeb31e39391ca5d361fa619.tar.gz sway-da76ecb5f8bb0e0d9aeb31e39391ca5d361fa619.tar.zst sway-da76ecb5f8bb0e0d9aeb31e39391ca5d361fa619.zip |
escape check fix
Diffstat (limited to 'sway')
-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 | } |