summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-12 00:54:30 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-12 00:54:30 +0300
commit1f427df3fb8526ddde2e1b96250e148451240870 (patch)
tree4c26ad00566fc979e2f8ecbd8a66a13d0d852f6b /src/char
parent1b10c7ccd946aaa983d678f9aee6da5e0a315686 (diff)
downloadhercules-1f427df3fb8526ddde2e1b96250e148451240870.tar.gz
hercules-1f427df3fb8526ddde2e1b96250e148451240870.tar.bz2
hercules-1f427df3fb8526ddde2e1b96250e148451240870.tar.xz
hercules-1f427df3fb8526ddde2e1b96250e148451240870.zip
Fix issue http://hercules.ws/board/tracker/issue-8620-error-in-quest/
Diffstat (limited to 'src/char')
-rw-r--r--src/char/int_quest.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index 1d64f48a3..036229edd 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -246,14 +246,15 @@ int mapif_parse_quest_save(int fd)
void mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int num_quests)
{
- nullpo_retv(tmp_questlog);
WFIFOHEAD(fd,num_quests*sizeof(struct quest)+8);
WFIFOW(fd,0) = 0x3860;
WFIFOW(fd,2) = num_quests*sizeof(struct quest)+8;
WFIFOL(fd,4) = char_id;
- if (num_quests > 0)
+ if (num_quests > 0) {
+ nullpo_retv(tmp_questlog);
memcpy(WFIFOP(fd,8), tmp_questlog, sizeof(struct quest)*num_quests);
+ }
WFIFOSET(fd,num_quests*sizeof(struct quest)+8);
}