From 3b29df9eccc5cd4998355f858c2ab7d03f350932 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 17 Jul 2008 22:54:42 +0000 Subject: Update 0.4.1 tag -- fixes some bugs, including a serious memory 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 --- crawl-ref/source/hiscores.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/hiscores.cc') 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; } } } -- cgit v1.2.3-54-g00ecf