mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
cmd_funcs: Use glib function
This commit is contained in:
parent
8c4ce7a939
commit
1dbe1a33b4
@ -1651,8 +1651,7 @@ cmd_help(ProfWin* window, const char* const command, gchar** args)
|
|||||||
cons_navigation_help();
|
cons_navigation_help();
|
||||||
} else {
|
} else {
|
||||||
char* cmd = args[0];
|
char* cmd = args[0];
|
||||||
char cmd_with_slash[1 + strlen(cmd) + 1];
|
char *cmd_with_slash = g_strdup_printf("/%s", cmd);
|
||||||
sprintf(cmd_with_slash, "/%s", cmd);
|
|
||||||
|
|
||||||
Command* command = cmd_get(cmd_with_slash);
|
Command* command = cmd_get(cmd_with_slash);
|
||||||
if (command) {
|
if (command) {
|
||||||
@ -1666,6 +1665,7 @@ cmd_help(ProfWin* window, const char* const command, gchar** args)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
g_free(cmd_with_slash);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user