all repos — xyw @ fd710cd6654470c8e76becdc0a212f308cefd9b1

A minimal virtual machine and assembler for terminals.

Fixed warning on Linux.
h3rald h3rald@h3rald.com
Mon, 27 Jul 2026 06:58:10 +0200
commit

fd710cd6654470c8e76becdc0a212f308cefd9b1

parent

6f0306810ce94929df59faf93e5ffc50bad19ee7

1 files changed, 6 insertions(+), 1 deletions(-)

jump to
M xywrun.cxywrun.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