Fixed warning on Linux.
h3rald h3rald@h3rald.com
Mon, 27 Jul 2026 06:58:10 +0200
1 files changed,
6 insertions(+),
1 deletions(-)
jump to
M
xywrun.c
→
xywrun.c
@@ -448,7 +448,12 @@ *pc = 0x0000;
if (args) { - snprintf(xyw_exec_args, XYW_EXEC_ARGS_SIZE, "%s %s", path, args); + size_t plen = strlen(path); + size_t remaining = XYW_EXEC_ARGS_SIZE - plen - 1; + memcpy(xyw_exec_args, path, plen); + xyw_exec_args[plen] = ' '; + strncpy(&xyw_exec_args[plen + 1], args, remaining - 1); + xyw_exec_args[XYW_EXEC_ARGS_SIZE - 1] = '\0'; xyw_exec_args_active = 1; } else