reverse path order
This commit is contained in:
parent
7a63fcb376
commit
ed50d4daba
2 changed files with 14 additions and 4 deletions
12
src/loader.c
12
src/loader.c
|
@ -44,7 +44,17 @@ int load_elements(hashmap *m, char *table, int use_inv) {
|
|||
char *combo = calloc(strlen(combo_o) + 1, sizeof(char));
|
||||
strcpy(combo, combo_o);
|
||||
|
||||
if (use_inv == 2) {
|
||||
if (use_inv == 3) {
|
||||
uintptr_t result;
|
||||
hashmap_get(m, str, strlen(str) - 1, &result);
|
||||
|
||||
char *res = (char *)result;
|
||||
|
||||
if (res != 0 && strcmp(res, combo) == 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (use_inv == 2 || use_inv == 3) {
|
||||
hashmap_set(m, str, strlen(str) - 1, (uintptr_t)combo, 1);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -16,9 +16,9 @@ void init_tables(hashmap *elements, hashmap *inv, hashmap *polls,
|
|||
load_elements(elements, combo_file, 0) ||
|
||||
load_elements(elements, "bin/" combo_file, 0);
|
||||
|
||||
load_elements(elements_rev, "../elem_data/" combo_file, 2);
|
||||
load_elements(elements_rev, combo_file, 2) ||
|
||||
load_elements(elements_rev, "bin/" combo_file, 2);
|
||||
load_elements(elements_rev, "../elem_data/" combo_file, 3);
|
||||
load_elements(elements_rev, combo_file, 3) ||
|
||||
load_elements(elements_rev, "bin/" combo_file, 3);
|
||||
|
||||
load_elements(polls, "../elem_data/" poll_file, 2);
|
||||
|
||||
|
|
Loading…
Reference in a new issue