summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.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/items.cc
parent2bad330ab6184ddb6a90571c3cf27cfc5f7deafa (diff)
downloadcrawl-ref-1ba57425eac13b97dce30997a97afb1111adbbef.tar.gz
crawl-ref-1ba57425eac13b97dce30997a97afb1111adbbef.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/items.cc')
-rw-r--r--crawl-ref/source/items.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 7ee40289ca..4c1fb06865 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2389,7 +2389,9 @@ static bool _find_subtype_by_name(item_def &item,
item.special = 0;
item.flags = 0;
item.quantity = 1;
- set_ident_flags( item, ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PROPERTIES );
+ // Don't use set_ident_flags in order to avoid triggering notes.
+ // FIXME - is this the proper solution?
+ item.flags |= (ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PROPERTIES);
int type_wanted = -1;
@@ -2475,14 +2477,12 @@ bool item_is_equipped(const item_def &item)
if (you.equip[i] == EQ_NONE)
continue;
- item_def& eq(you.inv[you.equip[i]]);
+ const item_def& eq(you.inv[you.equip[i]]);
if (!is_valid_item(eq))
continue;
- if (eq.slot == item.slot)
- return (true);
- else if (&eq == &item)
+ if (&eq == &item)
return (true);
}