diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-07 23:57:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-07 23:57:48 +0300 |
commit | 8aeb5afe7d8c3cb9f2d3aad45d573cbb59566412 (patch) | |
tree | 85897ef68912cd65aa99cc535ccc82df09984cd3 | |
parent | f23f3bf2bf6270b89abdfe9cdfe5bda59e061fae (diff) | |
download | plugin-8aeb5afe7d8c3cb9f2d3aad45d573cbb59566412.tar.gz plugin-8aeb5afe7d8c3cb9f2d3aad45d573cbb59566412.tar.bz2 plugin-8aeb5afe7d8c3cb9f2d3aad45d573cbb59566412.tar.xz plugin-8aeb5afe7d8c3cb9f2d3aad45d573cbb59566412.zip |
char: check minimal char race id.
Also fix checks for sex.
-rw-r--r-- | src/char/char.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c index 4a3455e..571ef3b 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -42,9 +42,10 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd) if (sd->version >= 4) { race = RFIFOW(fd, 31); - if (race > max_char_class) + if (race < min_char_class || race > max_char_class) { chr->creation_failed(fd, 10); + RFIFOSKIP(fd, 31 + 3); hookStop(); return; } @@ -52,6 +53,7 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd) if (sex > 1 && sex != 99) { chr->creation_failed(fd, 11); + RFIFOSKIP(fd, 31 + 3); hookStop(); return; } |