mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
parent
3fa7931d53
commit
2b51d41631
@ -81,10 +81,8 @@ static struct command_t _parse_command(char *str)
|
||||
struct command_t cmd;
|
||||
char **split = g_strsplit(str, " ", 0);
|
||||
|
||||
cmd.command = malloc((strlen(split[0]) + 1) * sizeof(char));
|
||||
strcpy(cmd.command, split[0]);
|
||||
cmd.command = split[0];
|
||||
cmd.params = NULL;
|
||||
g_strfreev(split);
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user