diff options
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 86f3ddc0d..fc6e23427 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -4431,7 +4431,10 @@ int mob_read_libconfig(const char *filename, bool ignore_missing) if (ignore_missing && !exists(filepath)) return 0; - if (libconfig->read_file(&mob_db_conf, filepath) || !(mdb = libconfig->setting_get_member(mob_db_conf.root, "mob_db"))) { + if (!libconfig->load_file(&mob_db_conf, filepath)) + return 0; + + if ((mdb = libconfig->setting_get_member(mob_db_conf.root, "mob_db")) == NULL) { ShowError("can't read %s\n", filepath); return 0; } |