From 537d8cfed4159774f91ad8aa3b4d0f221b6f767d Mon Sep 17 00:00:00 2001 From: haranp Date: Sun, 25 Jan 2009 22:04:30 +0000 Subject: 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 --- crawl-ref/source/items.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crawl-ref/source/items.cc') 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) -- cgit v1.2.3-54-g00ecf