diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-20 14:33:31 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-20 14:33:31 +0000 |
commit | 63a75ab2f267cd8b38eec0d86fa348cf99dcdf2a (patch) | |
tree | 5b83a3517d55daaf859d45a21aed3e66a52ed1e5 /src/map/charcommand.c | |
parent | 8f1cae217b2ddf1d893ab4dd7456f8c7f4f5dcac (diff) | |
download | hercules-63a75ab2f267cd8b38eec0d86fa348cf99dcdf2a.tar.gz hercules-63a75ab2f267cd8b38eec0d86fa348cf99dcdf2a.tar.bz2 hercules-63a75ab2f267cd8b38eec0d86fa348cf99dcdf2a.tar.xz hercules-63a75ab2f267cd8b38eec0d86fa348cf99dcdf2a.zip |
* Fixed the server not reacting properly to atcommands/charcommands when using langtype 10/11 (the |XY codepage indicator wasn't being trimmed)
* Fixed some joker's code trying to dereference a null pointer in atcommand_param
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9679 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/charcommand.c')
-rw-r--r-- | src/map/charcommand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c index 6f588090c..2c6942c4e 100644 --- a/src/map/charcommand.c +++ b/src/map/charcommand.c @@ -194,6 +194,9 @@ is_charcommand(const int fd, struct map_session_data* sd, const char* message) { if (!*str) return CharCommand_None; + if(str[0] == '|' && strlen(str) >= 4 && str[3] == charcommand_symbol) + str += 3; // skip 10/11-langtype's codepage indicator, if detected + return is_charcommand_sub(fd,sd,str,pc_isGM(sd)); } @@ -213,10 +216,7 @@ CharCommandType charcommand(struct map_session_data* sd, const int level, const return CharCommand_None; } - if(p[0] == '|') - p += 3; - - if (*p == charcommand_symbol) { // check first char, try to skip |00 (or something else) [Lance] + if (*p == charcommand_symbol) { // check first char char command[101]; int i = 0; memset(info, 0, sizeof(CharCommandInfo)); |