mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 09:51:29 +00:00
Fix issue #1287
All variables without a $ prefix lost their last character due to off by one error
This commit is contained in:
parent
a4e3b4fd7b
commit
05aeccfca0
|
@ -30,7 +30,7 @@ struct cmd_results *cmd_set(int argc, char **argv) {
|
|||
if (!tmp) {
|
||||
return cmd_results_new(CMD_FAILURE, "set", "Not possible to create variable $'%s'", argv[0]);
|
||||
}
|
||||
snprintf(tmp, size, "$%s", argv[0]);
|
||||
snprintf(tmp, size+1, "$%s", argv[0]);
|
||||
|
||||
argv[0] = tmp;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue