diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-07 20:46:50 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-07 20:46:50 +0000 |
commit | 7552d664e93bf93887e09a18f670cd667bb400d8 (patch) | |
tree | 981dbf0c2f60d02906b61a77c1fdc7b08bdad738 /src | |
parent | 46277a00763ea482918a6e358de4fe0de51ef0c1 (diff) | |
download | hercules-7552d664e93bf93887e09a18f670cd667bb400d8.tar.gz hercules-7552d664e93bf93887e09a18f670cd667bb400d8.tar.bz2 hercules-7552d664e93bf93887e09a18f670cd667bb400d8.tar.xz hercules-7552d664e93bf93887e09a18f670cd667bb400d8.zip |
- Bug ID #184: Char Creation With An Empty Name [Zephyrus]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11377 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/char_sql/char.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 0f42d3b96..873568896 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1104,6 +1104,13 @@ int make_new_char_sql(int fd, unsigned char *dat) ShowInfo("New character request (%d)\n", sd->account_id); + // check lenght of character name + if (strlen(name) < 4) { + char_log("Create char failed (character name too small): (connection #%d, account: %d, name: '%s').\n", + fd, sd->account_id, dat); + return -2; + } + //check name != main chat nick [LuzZza] if(strcmpi(name, main_chat_nick) == 0) { ShowInfo("Create char failed (%d): this nick (%s) reserved for mainchat messages.\n", sd->account_id, name); |