diff --git a/bin/combos.txt b/bin/combos.txt index 6d3ad1f..25d42eb 100644 --- a/bin/combos.txt +++ b/bin/combos.txt @@ -38,3 +38,4 @@ ocean;land;sea planet;earth;ocean planet;land;ocean star;fire;sky +pollution;air;dust diff --git a/src/main.c b/src/main.c index 4990570..a74ee7d 100644 --- a/src/main.c +++ b/src/main.c @@ -56,6 +56,14 @@ int main(int argc, char *argv[]) { uintptr_t result; hashmap_get(elements, command_re, strlen(command_re), &result); + // todo: better + if (result == 0) { + load_elements(elements, combo_file, 0) || + load_elements(elements, "bin/" combo_file, 0); + + hashmap_get(elements, command_re, strlen(command_re), &result); + } + if (result == 0) { printf("You didn't make anything.\n"); continue; @@ -72,7 +80,7 @@ int main(int argc, char *argv[]) { if (fptr == NULL) continue; fwrite(res_str, sizeof(char), strlen(res_str), fptr); - fwrite("\n",sizeof(char),1,fptr); + fwrite("\n", sizeof(char), 1, fptr); fclose(fptr); }