diff options
author | Haru <haru@dotalux.com> | 2018-05-06 17:54:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-06 17:54:15 +0200 |
commit | 141df5f2f9421851fb974bf89e1fe5d58a4c61a8 (patch) | |
tree | b81f59a4d4c4f17e05c462bb9a537108cb5173f7 /src/char/pincode.c | |
parent | b889108f6dea3e1765681b9eaf4a39a18c24eeec (diff) | |
parent | fa5cc0300a337d4bb242fc10f6747fac1f1752c4 (diff) | |
download | hercules-141df5f2f9421851fb974bf89e1fe5d58a4c61a8.tar.gz hercules-141df5f2f9421851fb974bf89e1fe5d58a4c61a8.tar.bz2 hercules-141df5f2f9421851fb974bf89e1fe5d58a4c61a8.tar.xz hercules-141df5f2f9421851fb974bf89e1fe5d58a4c61a8.zip |
Merge pull request #2029 from 4144/pincodefix
Fix pincodes after commit 2a05dbfc2f62c6bbac7983dcec120502914567f1.
Diffstat (limited to 'src/char/pincode.c')
-rw-r--r-- | src/char/pincode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/char/pincode.c b/src/char/pincode.c index 01c1f482c..73d9809fa 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -82,6 +82,7 @@ void pincode_check(int fd, struct char_session_data* sd) return; safestrncpy(pin, RFIFOP(fd, 6), sizeof(pin)); + pincode->decrypt(sd->pincode_seed, pin); if (pincode->check_blacklist && pincode->isBlacklisted(pin)) { pincode->loginstate(fd, sd, PINCODE_LOGIN_RESTRICT_PW); @@ -205,7 +206,7 @@ void pincode_makestate(int fd, struct char_session_data *sd, enum pincode_make_r WFIFOHEAD(fd, 8); WFIFOW(fd, 0) = 0x8bb; WFIFOW(fd, 2) = state; - WFIFOW(fd, 4) = 0; + WFIFOL(fd, 4) = sd->pincode_seed; WFIFOSET(fd, 8); } @@ -223,7 +224,7 @@ void pincode_editstate(int fd, struct char_session_data *sd, enum pincode_edit_r WFIFOHEAD(fd, 8); WFIFOW(fd, 0) = 0x8bf; WFIFOW(fd, 2) = state; - WFIFOW(fd, 4) = sd->pincode_seed = rnd() % 0xFFFF; + WFIFOL(fd, 4) = sd->pincode_seed = rnd() % 0xFFFF; WFIFOSET(fd, 8); } |