summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/hiscores.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 20:01:57 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 20:01:57 +0000
commitdf7277971d69700cdce14059ea7d224500c3aa06 (patch)
tree6a42c70de47329fb34b31b91bdac76340a192ecd /crawl-ref/source/hiscores.cc
parent3e5fbd50de561ffc9e84fba6c4b2d0a2e13b118a (diff)
downloadcrawl-ref-df7277971d69700cdce14059ea7d224500c3aa06.tar.gz
crawl-ref-df7277971d69700cdce14059ea7d224500c3aa06.zip
Fix for 2020876: num_diff_runes was being calculated incorrectly.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6588 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/hiscores.cc')
-rw-r--r--crawl-ref/source/hiscores.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 3d2f7dc281..6267202d22 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -972,8 +972,7 @@ void scorefile_entry::init()
num_diff_runes = 0;
FixedVector< int, NUM_RUNE_TYPES > rune_array;
- for (int i = 0; i < NUM_RUNE_TYPES; i++)
- rune_array[i] = 0;
+ rune_array.init(0);
// inventory value is only calculated for winners
const bool calc_item_values = (death_type == KILLED_BY_WINNING);
@@ -1003,9 +1002,10 @@ void scorefile_entry::init()
continue;
}
- rune_array[ you.inv[d].plus ] += you.inv[d].quantity;
if (rune_array[ you.inv[d].plus ] == 0)
num_diff_runes++;
+
+ rune_array[ you.inv[d].plus ] += you.inv[d].quantity;
}
}
}