hirc

IRC client
Log | Files | Refs

commit d8f942f180cd83287e51165a397a8f19e0afb7da
parent e6ab59adb7a45f65a5dcba7a1acda97bbf0c597a
Author: hhvn <dev@hhvn.uk>
Date:   Thu,  9 Dec 2021 17:57:55 +0000

ui.c: fix snprintf len

Diffstat:
Mui.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui.c b/ui.c @@ -1365,7 +1365,7 @@ ui_bind(char *binding, char *cmd) { p->binding = strdup(ui_rectrl(binding)); if (*cmd != '/') { tmp = malloc(strlen(cmd) + 2); - snprintf(tmp, sizeof(tmp) + 2, "/%s", cmd); + snprintf(tmp, strlen(cmd) + 2, "/%s", cmd); p->cmd = tmp; } else { p->cmd = strdup(cmd);