diff options
author | Neil Moore <neil@s-z.org> | 2014-08-06 01:23:27 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-08-06 01:23:27 -0400 |
commit | 909ab742cb520ae388052bebbc1dcdc864f27b11 (patch) | |
tree | efb90c6efdb62a8c75f5f71ec5f3edf12a5a8a02 /crawl-ref/source/mon-util.cc | |
parent | 17e225f897e91837dabf6206a81354df7091e442 (diff) | |
download | crawl-ref-909ab742cb520ae388052bebbc1dcdc864f27b11.tar.gz crawl-ref-909ab742cb520ae388052bebbc1dcdc864f27b11.zip |
Check the size of mspell_list at compile time.
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index dbce2ded97..8a7a7190f4 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -2291,6 +2291,9 @@ vector<mon_spellbook_type> get_spellbooks(const monster_info &mon) // or in the case of ghosts their actual spells. unique_books get_unique_spells(const monster_info &mi) { + // No entry for MST_GHOST + COMPILE_CHECK(ARRAYSZ(mspell_list) == NUM_MSTYPES - 1); + const vector<mon_spellbook_type> books = get_spellbooks(mi); const size_t num_books = books.size(); |