🐛 ChangePassword accidentately didnt set new pass

This commit is contained in:
EntireTwix 2021-04-01 19:39:58 -07:00
parent 8aa4581ffb
commit 1c7b2f67fe
2 changed files with 8 additions and 3 deletions

View file

@ -20,7 +20,7 @@ public:
const bool state = (password == attempt);
if (state)
{
password == new_pass;
password = new_pass;
}
return state;
}

View file

@ -3,8 +3,13 @@
int main()
{
User x(1000, "pass123");
std::cout << x.ChangePassword("pass123", "newpass123");
User a(1000, "pass123");
User b(0, "pass123");
std::cout << a.ChangePassword("pass123", "newpass123") << '\n';
std::cout << SendFunds(a, b, 250, "newpass123") << '\n';
a.GetBal();
a.VerifyPassword("newpass124");
std::cout << a.GetBal() << '\n';
return 0;
}