🐛 fixed hash loading bug

This commit is contained in:
EntireTwix 2021-04-13 10:48:07 -07:00
parent e4b6d2987d
commit bd8bf25b08
2 changed files with 3 additions and 3 deletions

View file

@ -199,7 +199,7 @@ public:
user_save.close();
for (const auto &u : temp.getMemberNames())
{
users.try_emplace(u, temp[u]["balance"].asUInt(), std::move(temp[u]["password"].asString()));
users.try_emplace(u, temp[u]["balance"].asUInt(), std::move(temp[u]["password"].asUInt64()));
}
}
}

View file

@ -5,7 +5,7 @@
struct User
{
uint_fast32_t balance = 0;
uint_fast64_t password;
uint64_t password;
/**
* @brief User constructor
@ -26,7 +26,7 @@ struct User
{
Json::Value res;
res["balance"] = (Json::UInt)balance;
res["password"] = (Json::LargestUInt)password;
res["password"] = (Json::UInt64)password;
return res;
}
};