diff options
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 3aba4a0a1..0a73e03f4 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -4802,14 +4802,17 @@ void clif_GlobalMessage(struct block_list *bl,char *message) */
void clif_MainChatMessage(char* message) {
- char buf[100];
+ char buf[128];
int len;
if(!message)
return;
len = strlen(message)+1;
-
+ if (len+8 > sizeof(buf)) {
+ ShowDebug("clif_MainChatMessage: Received message too long (len %d): %s\n", len, message);
+ len = sizeof(buf)-8;
+ }
WBUFW(buf,0)=0x8d;
WBUFW(buf,2)=len+8;
WBUFL(buf,4)=0;
|