mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-16 16:12:14 +11:00
🐛 ChangePassword accidentately didnt set new pass
This commit is contained in:
parent
8aa4581ffb
commit
1c7b2f67fe
2 changed files with 8 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ public:
|
|||
const bool state = (password == attempt);
|
||||
if (state)
|
||||
{
|
||||
password == new_pass;
|
||||
password = new_pass;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
|
|
|||
9
main.cpp
9
main.cpp
|
|
@ -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;
|
||||
}
|
||||
Loading…
Reference in a new issue