return quickcommands + i

This commit is contained in:
onyx-and-iris 2024-07-10 23:57:19 +01:00
parent ff2970f4c5
commit 68c2022ad7

View File

@ -97,9 +97,9 @@ struct quickcommand *command_in_quickcommands(const char *command_key, const str
{
for (int i = 0; i < n; i++)
{
if (strncmp(command_key, quickcommands[i].name, strlen(command_key)) == 0)
if (strcmp(command_key, quickcommands[i].name) == 0)
{
return (struct quickcommand *)&quickcommands[i];
return (struct quickcommand *)(quickcommands + i);
}
}
return NULL;