summaryrefslogtreecommitdiff
path: root/src/map/quest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/quest.c')
-rw-r--r--src/map/quest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/quest.c b/src/map/quest.c
index f2a6fae1f..bde276f9d 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -460,9 +460,9 @@ int quest_reload_check_sub(struct map_session_data *sd, va_list ap) {
}
j++;
}
- sd->num_quests = 0;
- ARR_FIND(sd->avail_quests, 0, j, sd->quest_log[j].state != Q_COMPLETE);
- sd->avail_quests = j+1;
+ sd->num_quests = j;
+ ARR_FIND(0, sd->num_quests, i, sd->quest_log[i].state == Q_COMPLETE);
+ sd->avail_quests = i;
return 1;
}