From c0e23cadf3d9f9cb8c91a9d99d252bcc72a6e79e Mon Sep 17 00:00:00 2001 From: ultramage Date: Sun, 26 Jun 2011 15:04:47 +0000 Subject: Fixed quest index memory corruption when adding new quests (since r14039, bugreport:4982). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14867 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/quest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/quest.c b/src/map/quest.c index 4960d8a93..4c890ce9e 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -85,7 +85,7 @@ int quest_add(TBL_PC * sd, int quest_id) i = sd->avail_quests; memmove(&sd->quest_log[i+1], &sd->quest_log[i], sizeof(struct quest)*(sd->num_quests-sd->avail_quests)); - memmove(sd->quest_index+i+1, sd->quest_log+i, sizeof(int)*(sd->num_quests-sd->avail_quests)); + memmove(sd->quest_index+i+1, sd->quest_index+i, sizeof(int)*(sd->num_quests-sd->avail_quests)); memset(&sd->quest_log[i], 0, sizeof(struct quest)); sd->quest_log[i].quest_id = quest_db[j].id; -- cgit v1.2.3-70-g09d2