diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-24 21:55:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-24 22:14:48 +0300 |
commit | df032822a50b15877d43920522cabf85fff78589 (patch) | |
tree | 298bb0bcabb0cac0238d3a08e50ad55961d9ff8d | |
parent | 6b1a6418c8691003b99b84b49d9d2ddcc399801b (diff) | |
download | plugin-df032822a50b15877d43920522cabf85fff78589.tar.gz plugin-df032822a50b15877d43920522cabf85fff78589.tar.bz2 plugin-df032822a50b15877d43920522cabf85fff78589.tar.xz plugin-df032822a50b15877d43920522cabf85fff78589.zip |
Fix wrong packet buffers preallocations.
-rw-r--r-- | src/login/send.c | 2 | ||||
-rw-r--r-- | src/map/clif.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/login/send.c b/src/login/send.c index eca884d..abb85da 100644 --- a/src/login/send.c +++ b/src/login/send.c @@ -30,7 +30,7 @@ void send_update_host(int fd) if (!update_server) return; const int sz = strlen(update_server); - WFIFOHEAD(fd, sz); + WFIFOHEAD(fd, sz + 4); WFIFOW(fd, 0) = 0x63; WFIFOW(fd, 2) = sz + 4; memcpy(WFIFOP (fd, 4), update_server, sz); diff --git a/src/map/clif.c b/src/map/clif.c index 6099dd5..4efe576 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -72,14 +72,13 @@ void eclif_quest_add(struct map_session_data *sd, struct quest *qd) return; } - WFIFOHEAD(fd, packet_len(0x2b3)); + WFIFOHEAD(fd, 107); WFIFOW(fd, 0) = 0x2b3; WFIFOL(fd, 2) = qd->quest_id; WFIFOB(fd, 6) = qd->count[0]; // was state; WFIFOB(fd, 7) = qd->time - qi->time; WFIFOL(fd, 11) = qd->time; WFIFOW(fd, 15) = 0; - WFIFOSET(fd, 107); hookStop(); } |