summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authormomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-20 02:26:02 +0000
committermomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-20 02:26:02 +0000
commit669bc9f2af16b07615996e040ce4927bd87da016 (patch)
tree801c64d589aa3f08efd405f6aa29f5b589d97f00 /src/char
parent8e75d22e0b6db54d45d09f497d4fe636778bc505 (diff)
downloadhercules-669bc9f2af16b07615996e040ce4927bd87da016.tar.gz
hercules-669bc9f2af16b07615996e040ce4927bd87da016.tar.bz2
hercules-669bc9f2af16b07615996e040ce4927bd87da016.tar.xz
hercules-669bc9f2af16b07615996e040ce4927bd87da016.zip
- Fixed bugreport:6915, where @follow would still be enabled when the target/source died;
- Fixed a exploit on the creation char process, the hair color and style could be bypassed (bugreport:6916). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16930 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/char/char.c b/src/char/char.c
index d7f7749c4..ee41e061d 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1493,6 +1493,9 @@ int make_new_char_sql(struct char_session_data* sd, char* name_, int str, int ag
|| (str + int_ != 10 || agi + luk != 10 || vit + dex != 10) ) // pairs
#endif
return -2; // invalid input
+
+ if (hair_style > 17 || hair_color > 8)
+ return -2;
// check the number of already existing chars in this account
if( char_per_account != 0 ) {