incremented too soon in allusers

This commit is contained in:
EntireTwix 2021-04-19 03:42:39 -07:00
parent a80f6b5959
commit 32b6af280e

View file

@ -155,10 +155,11 @@ public:
for (const auto &u : users) for (const auto &u : users)
{ {
//we know it contains this key but we call this func to grab mutex //we know it contains this key but we call this func to grab mutex
temp[i++]["name"] = u.first; temp[i]["name"] = u.first;
users.if_contains(u.first, [&temp, i](const User &u) { users.if_contains(u.first, [&temp, i](const User &u) {
temp[i]["balance"] = (Json::UInt)u.balance; temp[i]["balance"] = (Json::UInt)u.balance;
}); });
++i;
} }
return temp; return temp;
} }