fix sorting bug
Това подаване се съдържа в:
родител
8740f23c0a
подаване
7279afeb4c
2 променени файла с 3 добавяния и 1 изтривания
|
@ -44,7 +44,7 @@ char *get_command(char *command, char *command_re, char **sort_tmp) {
|
||||||
int combos = 0;
|
int combos = 0;
|
||||||
for (int i = 1; i < MAX_COMBO_LENGTH; i++) {
|
for (int i = 1; i < MAX_COMBO_LENGTH; i++) {
|
||||||
combos = i;
|
combos = i;
|
||||||
sort_tmp[i] = strstr(command, ";");
|
sort_tmp[i] = strstr(sort_tmp[i-1], ";");
|
||||||
if (sort_tmp[i] == 0)
|
if (sort_tmp[i] == 0)
|
||||||
break;
|
break;
|
||||||
sort_tmp[i][0] = '\0';
|
sort_tmp[i][0] = '\0';
|
||||||
|
|
|
@ -26,6 +26,8 @@ int main(int argc, char *argv[]) {
|
||||||
uintptr_t result;
|
uintptr_t result;
|
||||||
hashmap_get(elements, command_re, strlen(command_re), &result);
|
hashmap_get(elements, command_re, strlen(command_re), &result);
|
||||||
|
|
||||||
|
printf("%s\n",command_re);
|
||||||
|
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
printf("You didn't make anything.\n");
|
printf("You didn't make anything.\n");
|
||||||
continue;
|
continue;
|
||||||
|
|
Зареждане…
Препратка в нова задача