From 32b6af280ee1f79af5ff50365bf9a2677676f36b Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Mon, 19 Apr 2021 03:42:39 -0700 Subject: [PATCH] incremented too soon in allusers --- include/bank.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/bank.hpp b/include/bank.hpp index 5ccf018..9680fe1 100644 --- a/include/bank.hpp +++ b/include/bank.hpp @@ -155,10 +155,11 @@ public: for (const auto &u : users) { //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) { temp[i]["balance"] = (Json::UInt)u.balance; }); + ++i; } return temp; }