summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-17 21:54:12 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-17 21:54:12 +0300
commit83a2ec502bbe1a8a86ef6361eaf98f38f5d2a653 (patch)
tree733e570811bd4766e3050b8c1c639141ab4f26d2 /src
parent42159c00507721d3b8f0fd67c52a17d562b75a05 (diff)
downloadplugin-83a2ec502bbe1a8a86ef6361eaf98f38f5d2a653.tar.gz
plugin-83a2ec502bbe1a8a86ef6361eaf98f38f5d2a653.tar.bz2
plugin-83a2ec502bbe1a8a86ef6361eaf98f38f5d2a653.tar.xz
plugin-83a2ec502bbe1a8a86ef6361eaf98f38f5d2a653.zip
map: fix buffer usage in send_local_message.
Diffstat (limited to 'src')
-rw-r--r--src/map/send.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/send.c b/src/map/send.c
index ccfb052..2739e7b 100644
--- a/src/map/send.c
+++ b/src/map/send.c
@@ -62,9 +62,9 @@ void send_local_message(int fd, struct block_list* bl, const char* msg)
}
WFIFOHEAD (fd, msg_len + 8);
- WBUFW (fd, 0) = 0x8d;
- WBUFW (fd, 2) = msg_len + 8;
- WBUFL (fd, 4) = bl->id;
- safestrncpy((char*)WBUFP(fd, 8), msg, msg_len);
+ WFIFOW (fd, 0) = 0x8d;
+ WFIFOW (fd, 2) = msg_len + 8;
+ WFIFOL (fd, 4) = bl->id;
+ safestrncpy((char*)WFIFOP(fd, 8), msg, msg_len);
WFIFOSET (fd, msg_len + 8);
}