fix sorting bug
This commit is contained in:
parent
8740f23c0a
commit
7279afeb4c
2 changed files with 3 additions and 1 deletions
|
@ -44,7 +44,7 @@ char *get_command(char *command, char *command_re, char **sort_tmp) {
|
|||
int combos = 0;
|
||||
for (int i = 1; i < MAX_COMBO_LENGTH; i++) {
|
||||
combos = i;
|
||||
sort_tmp[i] = strstr(command, ";");
|
||||
sort_tmp[i] = strstr(sort_tmp[i-1], ";");
|
||||
if (sort_tmp[i] == 0)
|
||||
break;
|
||||
sort_tmp[i][0] = '\0';
|
||||
|
|
|
@ -26,6 +26,8 @@ int main(int argc, char *argv[]) {
|
|||
uintptr_t result;
|
||||
hashmap_get(elements, command_re, strlen(command_re), &result);
|
||||
|
||||
printf("%s\n",command_re);
|
||||
|
||||
if (result == 0) {
|
||||
printf("You didn't make anything.\n");
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue