summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-19 12:54:24 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-19 12:54:24 +0000
commita0ac735b25ccb42e5576c610527724bf7a17e090 (patch)
tree94babcce7588872a7fd40314722bc663ccd65d8d /crawl-ref
parent9466d4967629c9b19db3cf0064f72432b8705fa9 (diff)
downloadcrawl-ref-a0ac735b25ccb42e5576c610527724bf7a17e090.tar.gz
crawl-ref-a0ac735b25ccb42e5576c610527724bf7a17e090.zip
Prevent "make item by name" wiz command from crashing if the string entered
partially matches "dummy unrandart". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10577 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/debug.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 58d4ddc907..e45846fbeb 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -1486,7 +1486,7 @@ bool get_item_by_name(item_def *item, char* specs,
strcpy(obj_name, entry->name);
ptr = strstr( strlwr(obj_name), specs );
- if (ptr != NULL && item->base_type == class_wanted)
+ if (ptr != NULL && entry->base_type == class_wanted)
{
make_item_unrandart(*item, index);
if (create_for_real)