summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/hiscores.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 22:54:42 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 22:54:42 +0000
commit3b29df9eccc5cd4998355f858c2ab7d03f350932 (patch)
tree2f2934dedc15ed4d8bde60a9a48649504556f050 /crawl-ref/source/hiscores.cc
parent2bad330ab6184ddb6a90571c3cf27cfc5f7deafa (diff)
downloadcrawl-ref-0.4.1.tar.gz
crawl-ref-0.4.1.zip
Update 0.4.1 tag -- fixes some bugs, including a serious memory0.4.1
corruption and a scoring one. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/tags/stone_soup-0.4.1@6594 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;
}
}
}