diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-30 16:26:40 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-30 16:26:40 +0000 |
commit | 19df35fe6834565230b85def097ae8dbb81a59ba (patch) | |
tree | bb336b14fb41596c5887eddc7e239398dcc49bdd /crawl-ref/source/randart.cc | |
parent | a00c4e7badad05aa8db9f45d07863bc7d52d767a (diff) | |
download | crawl-ref-19df35fe6834565230b85def097ae8dbb81a59ba.tar.gz crawl-ref-19df35fe6834565230b85def097ae8dbb81a59ba.zip |
Fix off-by-one error when choosing a random god to gift an artefact.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4779 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/randart.cc')
-rw-r--r-- | crawl-ref/source/randart.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index 9c4bef9155..40c406ee75 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -241,7 +241,7 @@ static std::string _replace_name_parts(const std::string name_in, { do { - which_god = static_cast<god_type>(random2(NUM_GODS)); + which_god = static_cast<god_type>(random2(NUM_GODS - 1) + 1); } while (!_god_fits_artefact(which_god, item)); } |