Woops, fixes and defines. :P

This commit is contained in:
StackZ
2020-11-07 10:52:08 +01:00
parent ee2769b294
commit 0dc8369bff
6 changed files with 32 additions and 12 deletions
+3 -3
View File
@@ -219,9 +219,9 @@ void Store::LoadFromFile(const std::string &file) {
/* Check, if valid. */
if (this->storeJson.contains("storeInfo") && this->storeJson.contains("storeContent")) {
if (this->storeJson["storeInfo"].contains("version") && this->storeJson["storeInfo"]["version"].is_number()) {
if (this->storeJson["storeInfo"]["version"] < 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_OLD"));
else if (this->storeJson["storeInfo"]["version"] > 3) Msg::waitMsg(Lang::get("UNISTORE_TOO_NEW"));
this->valid = this->storeJson["storeInfo"]["version"] == 3;
if (this->storeJson["storeInfo"]["version"] < _UNISTORE_VERSION) Msg::waitMsg(Lang::get("UNISTORE_TOO_OLD"));
else if (this->storeJson["storeInfo"]["version"] > _UNISTORE_VERSION) Msg::waitMsg(Lang::get("UNISTORE_TOO_NEW"));
this->valid = this->storeJson["storeInfo"]["version"] == _UNISTORE_VERSION;
}
} else {