summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 426ee53..2858e50 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7501,6 +7501,7 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
}
}
+
/*==========================================
*
*------------------------------------------
@@ -7632,7 +7633,14 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c <
int clif_message(struct block_list *bl, char* msg)
{
unsigned short msg_len = strlen(msg) + 1;
- unsigned char buf[256];
+ static int buf_len = -1;
+ static unsigned char *buf = NULL;
+
+ if (buf_len < msg_len) {
+ if (buf)
+ free(buf);
+ buf = malloc(buf_len = (msg_len + 16));
+ }
nullpo_retr(0, bl);