diff options
author | Fate <fate-tmw@googlemail.com> | 2008-12-05 21:47:26 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-12-05 21:47:26 -0700 |
commit | b2718e6b40767b0b898ed165de29f1621e974b07 (patch) | |
tree | 0989a1e2638b0ed3f079685f7136918a5758eea1 /src/map/clif.c | |
parent | cc8781ddac1b0dd6d67182f3e9b553ea163e43b7 (diff) | |
parent | a444f55f1448cfb3b14f9019fd73b684e6a9f322 (diff) | |
download | tmwa-b2718e6b40767b0b898ed165de29f1621e974b07.tar.gz tmwa-b2718e6b40767b0b898ed165de29f1621e974b07.tar.bz2 tmwa-b2718e6b40767b0b898ed165de29f1621e974b07.tar.xz tmwa-b2718e6b40767b0b898ed165de29f1621e974b07.zip |
Merge branch 'master' into exp
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 426ee53..ab64c2d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2583,7 +2583,7 @@ int clif_changestatus(struct block_list *bl,int type,int val) */ int clif_changelook(struct block_list *bl,int type,int val) { - clif_changelook_towards(bl, type, val, NULL); + return clif_changelook_towards(bl, type, val, NULL); } int clif_changelook_towards(struct block_list *bl,int type,int val, struct map_session_data *dstsd) @@ -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); |