aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/output/background.c
diff options
context:
space:
mode:
authorMuhamed Hobi <woohoomoo2u@gmail.com>2022-02-07 19:03:54 -0500
committerSimon Ser <contact@emersion.fr>2022-02-08 09:43:32 +0100
commitac7892371ce1ef7a05619492f0896f525b4dbdc3 (patch)
treea88179e4d50e08b41f95689e0bf766a9a8041943 /sway/commands/output/background.c
parent9a6687ee04db948a9f61cf2f4cc5966be84c822c (diff)
Fix snprintf compiler warning
Diffstat (limited to 'sway/commands/output/background.c')
-rw-r--r--sway/commands/output/background.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c
index 68ee9fe1..1a3939d4 100644
--- a/sway/commands/output/background.c
+++ b/sway/commands/output/background.c
@@ -112,7 +112,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) {
"Unable to allocate resources");
}
- sprintf(src, "%s/%s", conf_path, rel_path);
+ snprintf(src, strlen(conf_path) + strlen(src) + 2, "%s/%s", conf_path, rel_path);
free(rel_path);
free(conf);
}