fix sorting bug

This commit is contained in:
biglyderv 2025-03-24 21:53:39 -04:00
parent 8740f23c0a
commit 7279afeb4c
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
2 changed files with 3 additions and 1 deletions

View file

@ -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';

View file

@ -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;