diff --git a/dist/popnhax/popnhax.xml b/dist/popnhax/popnhax.xml
index 63921fd..95f3bed 100644
--- a/dist/popnhax/popnhax.xml
+++ b/dist/popnhax/popnhax.xml
@@ -26,7 +26,7 @@
0
-
+
0
@@ -59,17 +59,22 @@
0
-
+
0
-
+
0
-
+
+
diff --git a/popnhax/dllmain.cc b/popnhax/dllmain.cc
index da2011d..3730d7b 100644
--- a/popnhax/dllmain.cc
+++ b/popnhax/dllmain.cc
@@ -3897,7 +3897,11 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
LOG("popnhax: game dll: %s\n",g_game_dll_fn);
LOG("popnhax: config file: %s\n",g_config_fn);
- _load_config(g_config_fn, &config, config_psmap);
+ if (!_load_config(g_config_fn, &config, config_psmap))
+ {
+ LOG("FATAL ERROR: Could not parse %s\n", g_config_fn);
+ return FALSE;
+ }
if (force_trans_debug)
config.translation_debug = true;
diff --git a/util/xmlprop.hpp b/util/xmlprop.hpp
index f988089..081b081 100644
--- a/util/xmlprop.hpp
+++ b/util/xmlprop.hpp
@@ -84,17 +84,20 @@ struct property *load_prop_file(const char *filename) {
return config_data;
}
-void _load_config(const char *filename, void *dest, const struct property_psmap *psmap) {
+bool _load_config(const char *filename, void *dest, const struct property_psmap *psmap) {
struct property *config_xml = load_prop_file(filename);
if (!config_xml) {
printf("Couldn't load xml file: %s\n", filename);
- return;
+ return false;
}
if (!(property_psmap_import(config_xml, nullptr, dest, psmap))) {
printf("Couldn't parse psmap\n");
+ return false;
}
+
+ return true;
}
#endif
\ No newline at end of file