diff options
author | Jedzkie <jedzkie13@rocketmail.com> | 2018-06-21 09:40:31 +0800 |
---|---|---|
committer | Jedzkie <jedzkie13@rocketmail.com> | 2018-06-21 12:14:33 +0800 |
commit | eff53dac09b4a537c90c557f3dad0f70fbe891ac (patch) | |
tree | 77254cbd60ea038f03ec553846524454787dd128 /src/char | |
parent | b57232ac29732ff526eca750dee295a871861ed6 (diff) | |
download | hercules-eff53dac09b4a537c90c557f3dad0f70fbe891ac.tar.gz hercules-eff53dac09b4a537c90c557f3dad0f70fbe891ac.tar.bz2 hercules-eff53dac09b4a537c90c557f3dad0f70fbe891ac.tar.xz hercules-eff53dac09b4a537c90c557f3dad0f70fbe891ac.zip |
Fix pincode bug
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/pincode.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/char/pincode.c b/src/char/pincode.c index 2b59ec326..9f78444a1 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -161,12 +161,12 @@ void pincode_change(int fd, struct char_session_data* sd) if (pincode->check_blacklist && pincode->isBlacklisted(newpin)) { pincode->editstate(fd, sd, PINCODE_EDIT_RESTRICT_PW); - } else { - pincode->update(sd->account_id, newpin); - safestrncpy(sd->pincode, newpin, sizeof(sd->pincode)); - pincode->editstate(fd, sd, PINCODE_EDIT_SUCCESS); + return; } + pincode->update(sd->account_id, newpin); + safestrncpy(sd->pincode, newpin, sizeof(sd->pincode)); + pincode->editstate(fd, sd, PINCODE_EDIT_SUCCESS); pincode->loginstate(fd, sd, PINCODE_LOGIN_ASK); } @@ -190,6 +190,7 @@ void pincode_setnew(int fd, struct char_session_data* sd) pincode->update(sd->account_id, newpin); safestrncpy(sd->pincode, newpin, sizeof(sd->pincode)); pincode->makestate(fd, sd, PINCODE_MAKE_SUCCESS); + pincode->loginstate(fd, sd, PINCODE_LOGIN_ASK); } /** |