summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-06-29 14:50:22 +0200
committerGitHub <noreply@github.com>2018-06-29 14:50:22 +0200
commit887d53cac4391b438f07dccf7e148ff0769f6a55 (patch)
treeeaec5f273a4c3293a1f55fbfc5c06d36b323de23 /src/char
parent9bcb4b5257c3f2048c6610fdf03ddf681a0e84ff (diff)
parenteff53dac09b4a537c90c557f3dad0f70fbe891ac (diff)
downloadhercules-887d53cac4391b438f07dccf7e148ff0769f6a55.tar.gz
hercules-887d53cac4391b438f07dccf7e148ff0769f6a55.tar.bz2
hercules-887d53cac4391b438f07dccf7e148ff0769f6a55.tar.xz
hercules-887d53cac4391b438f07dccf7e148ff0769f6a55.zip
Merge pull request #2100 from Jedzkie/PincodeFix
Fix pincode bug
Diffstat (limited to 'src/char')
-rw-r--r--src/char/pincode.c9
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);
}
/**