1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

_cmd_tiny: fix allocation for usage variable

This commit is contained in:
Dmitry Podgorny 2012-11-16 13:44:15 +02:00
parent b5d1a8edcb
commit 5e6a1fed78

View File

@ -1301,7 +1301,7 @@ _cmd_tiny(const char * const inp, struct cmd_help_t help)
if (args == NULL) { if (args == NULL) {
cons_show("Usage: %s", help.usage); cons_show("Usage: %s", help.usage);
if (win_in_chat()) { if (win_in_chat()) {
char usage[strlen(help.usage + 8)]; char usage[strlen(help.usage) + 8];
sprintf(usage, "Usage: %s", help.usage); sprintf(usage, "Usage: %s", help.usage);
win_show(usage); win_show(usage);
} }