summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/options.h
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-08-02 00:32:07 -0400
committerNeil Moore <neil@s-z.org>2014-08-02 00:32:07 -0400
commite65269780554b34db055ccaf3d7f1874c5241415 (patch)
tree2c1054fc95918cce1c76fdc7e02f663b5aedde86 /crawl-ref/source/options.h
parentecce74e7d9301af283c5fbf36162adcb1b4d4a1c (diff)
downloadcrawl-ref-e65269780554b34db055ccaf3d7f1874c5241415.tar.gz
crawl-ref-e65269780554b34db055ccaf3d7f1874c5241415.zip
Assert when mapping a bad colour.
Hopefully this will turn the #8848 ugliness into crashes.
Diffstat (limited to 'crawl-ref/source/options.h')
-rw-r--r--crawl-ref/source/options.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/options.h b/crawl-ref/source/options.h
index 177c2619da..6f79d19766 100644
--- a/crawl-ref/source/options.h
+++ b/crawl-ref/source/options.h
@@ -539,6 +539,7 @@ extern game_options Options;
static inline short macro_colour(short col)
{
+ ASSERT_RANGE(col, 0, MAX_TERM_COLOUR);
return Options.colour[ col ];
}