diff options
author | Neil Moore <neil@s-z.org> | 2014-06-26 22:01:42 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-06-26 22:01:42 -0400 |
commit | afe582e62d68a8b0c5c4abb511448f797a77d67d (patch) | |
tree | 01bf1d3912071bb0fbb71274788724170555df75 /crawl-ref/source/asg.cc | |
parent | f5b527b32e7d12f89831272eeeeb58e97f73e2ee (diff) | |
download | crawl-ref-afe582e62d68a8b0c5c4abb511448f797a77d67d.tar.gz crawl-ref-afe582e62d68a8b0c5c4abb511448f797a77d67d.zip |
Assert that we don't use more RNGs than we have.
Diffstat (limited to 'crawl-ref/source/asg.cc')
-rw-r--r-- | crawl-ref/source/asg.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/asg.cc b/crawl-ref/source/asg.cc index fcbb4fcb2b..8f686dd44f 100644 --- a/crawl-ref/source/asg.cc +++ b/crawl-ref/source/asg.cc @@ -60,6 +60,8 @@ AsgKISS::AsgKISS(uint32_t init_key[], int key_length) uint32_t get_uint32(int generator) { + ASSERT(generator >= 0); + ASSERT(generator < ARRAYSZ(asg_rng)); return asg_rng[generator].get_uint32(); } |