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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/quest.c b/src/map/quest.c
index b76d6bc82..e993ab69d 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -43,7 +43,7 @@ struct quest_interface quest_s;
* @return Quest entry (equals to &quest->dummy if the ID is invalid)
*/
struct quest_db *quest_db(int quest_id) {
- if (quest_id < 0 || quest_id > MAX_QUEST_DB || quest->db_data[quest_id] == NULL)
+ if (quest_id < 0 || quest_id >= MAX_QUEST_DB || quest->db_data[quest_id] == NULL)
return &quest->dummy;
return quest->db_data[quest_id];
}