diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-06-07 20:37:08 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-06-07 20:37:08 -0400 |
commit | 212e4ef39518c4bb29eeef46f705770d3d28a6fc (patch) | |
tree | 19c1eb89136d7c96aa7a61703e362fba2fd1fa1d /sway/config.c | |
parent | Merge pull request #2084 from RedSoxFan/runtime-var-expansion (diff) | |
download | sway-212e4ef39518c4bb29eeef46f705770d3d28a6fc.tar.gz sway-212e4ef39518c4bb29eeef46f705770d3d28a6fc.tar.zst sway-212e4ef39518c4bb29eeef46f705770d3d28a6fc.zip |
Remove strip quoting and fix strncpy-overlap
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index 0e41df04..949c5cd3 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -660,7 +660,7 @@ char *do_var_replacement(char *str) { | |||
660 | // Unescape double $ and move on | 660 | // Unescape double $ and move on |
661 | if (find[1] == '$') { | 661 | if (find[1] == '$') { |
662 | size_t length = strlen(find + 1); | 662 | size_t length = strlen(find + 1); |
663 | strncpy(find, find + 1, length); | 663 | memmove(find, find + 1, length); |
664 | find[length] = '\0'; | 664 | find[length] = '\0'; |
665 | ++find; | 665 | ++find; |
666 | continue; | 666 | continue; |