summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-25 22:04:30 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-25 22:04:30 +0000
commit537d8cfed4159774f91ad8aa3b4d0f221b6f767d (patch)
treeadb857e3c42ec0545aa1671a9e1e708158d93155 /crawl-ref/source/items.cc
parent7cfe05ee417670c6a409cb4beb999be06a01e301 (diff)
downloadcrawl-ref-537d8cfed4159774f91ad8aa3b4d0f221b6f767d.tar.gz
crawl-ref-537d8cfed4159774f91ad8aa3b4d0f221b6f767d.zip
Following dolorous's comments on 2488905, use random_in_bounds() instead
of manual randomization. Also fixes the bug where this was biased towards the bottom-right section of the map. Unfortunately, it doesn't fix 2488905. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8750 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index a8e235b098..07377e47b6 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2328,7 +2328,7 @@ bool item_needs_autopickup(const item_def &item)
if (item_is_stationary(item))
return (false);
- if (strstr(item.inscription.c_str(), "=g") != 0)
+ if (item.inscription.find("=g") != std::string::npos)
return (true);
if ((item.flags & ISFLAG_THROWN) && Options.pickup_thrown)