aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/set.c
diff options
context:
space:
mode:
authorJonas Karlsson <jonaskarlsson@fripost.org>2017-10-03 21:51:02 +0200
committerJonas Karlsson <jonaskarlsson@fripost.org>2017-10-03 21:51:02 +0200
commit05aeccfca0d1f23e7c1591d7ab2fb226f19bd9e2 (patch)
treea1405bd8df53d3020be7da656a5be215f1b4f6b9 /sway/commands/set.c
parenta4e3b4fd7ba2b157aee7a583d0560ae297a8c276 (diff)
Fix issue #1287
All variables without a $ prefix lost their last character due to off by one error
Diffstat (limited to 'sway/commands/set.c')
-rw-r--r--sway/commands/set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/set.c b/sway/commands/set.c
index e3d08dd3..46fc6d38 100644
--- a/sway/commands/set.c
+++ b/sway/commands/set.c
@@ -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;
}