summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-09 17:45:51 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-09 17:45:51 +0000
commit486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df (patch)
tree32032934e3a8954081c78757268b6d581e01be39 /src/map/atcommand.c
parent6b37d26f7557bb6318e046fac461c05751c3f149 (diff)
downloadhercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.tar.gz
hercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.tar.bz2
hercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.tar.xz
hercules-486fbd1cb2438eba12fa4ebe8fc7acd3dcf072df.zip
* Corrected string lengths according to bugreport:198
- CHATBOX_SIZE: 70 -> 70+1 - removed some too aggressive checks in clif_parse_globalmessage() - removed CHAT_SIZE define as it actually doesn't apply anywhere - added CHAT_SIZE_MAX to serve as a custom limit to input string lengths - added length/contents checks to /b and /lb (against fake names) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11386 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index bfb20570a..1d05e915f 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -906,7 +906,7 @@ int atcommand_config_read(const char *cfgName)
*------------------------------------------*/
int atcommand_commands(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
- char cz_line_buff[CHATBOX_SIZE+1];
+ char cz_line_buff[CHATBOX_SIZE];
register char *lpcz_cur = cz_line_buff;
register unsigned int ui_slen;
@@ -914,7 +914,7 @@ int atcommand_commands(const int fd, struct map_session_data* sd, const char* co
int i_cur_cmd,gm_lvl = pc_isGM(sd), count = 0;
memset(cz_line_buff,' ',CHATBOX_SIZE);
- cz_line_buff[CHATBOX_SIZE] = 0;
+ cz_line_buff[CHATBOX_SIZE-1] = 0;
clif_displaymessage(fd, msg_txt(273));
@@ -932,7 +932,7 @@ int atcommand_commands(const int fd, struct map_session_data* sd, const char* co
clif_displaymessage(fd,(char*)cz_line_buff);
lpcz_cur = cz_line_buff;
memset(cz_line_buff,' ',CHATBOX_SIZE);
- cz_line_buff[CHATBOX_SIZE] = 0;
+ cz_line_buff[CHATBOX_SIZE-1] = 0;
}
memcpy(lpcz_cur,atcommand_info[i_cur_cmd].command,ui_slen);