mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-07-19 14:15:17 +02:00
Make sure an empty config is generated if the JSON is missing
This commit is contained in:
parent
9920de87f8
commit
bb7cd9faa0
1 changed files with 3 additions and 0 deletions
|
@ -182,6 +182,9 @@ try { exp } catch (...) {}
|
|||
copyObject(optsJ, confData);
|
||||
copyObject(opts["bindingNames"], confData.as_object()["bindingNames"], "bindingNames .");
|
||||
}
|
||||
else {
|
||||
raw = json::object({});
|
||||
}
|
||||
|
||||
#define SET_OPT_CUSTOMKEY(var, key, type) GUARD(var = opts[#key].as_##type();)
|
||||
#define SET_OPT(var, type) SET_OPT_CUSTOMKEY(var, var, type)
|
||||
|
|
Loading…
Add table
Reference in a new issue