summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-06 05:45:45 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-06 05:45:45 +0000
commit4b9d037c9fe47293bc079a8aaa8f86c9e08206ee (patch)
treeda5943345c31bcd12b6cb20920e8978f215eb718 /crawl-ref/source
parent9a2e461c9ded5c6b39aae77d0da6ed64fdb294d0 (diff)
downloadcrawl-ref-4b9d037c9fe47293bc079a8aaa8f86c9e08206ee.tar.gz
crawl-ref-4b9d037c9fe47293bc079a8aaa8f86c9e08206ee.zip
[1628897] Fix non-stacking food. Mea culpa.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@791 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/items.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 391e279508..1f2b344bf1 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1310,10 +1310,14 @@ bool is_stackable_item( const item_def &item )
int ident_flags(const item_def &item)
{
- int flags = item.flags & full_ident_mask(item);
+ const int identmask = full_ident_mask(item);
+ int flags = item.flags & identmask;
- if (!(flags & ISFLAG_KNOW_TYPE) && item_type_known(item))
+ if (identmask && (identmask & ISFLAG_KNOW_TYPE)
+ && !(flags & ISFLAG_KNOW_TYPE) && item_type_known(item))
+ {
flags |= ISFLAG_KNOW_TYPE;
+ }
return (flags);
}