diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-29 04:19:07 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-29 04:19:07 +0000 |
commit | 02a625bc48417a3340b2b4589f444194e44300ac (patch) | |
tree | 18227e40e89f642ffc299d7245f63f8ce79b2a24 /crawl-ref | |
parent | 876e6f79a7fb58665b524b68a05b7457e87601fd (diff) | |
download | crawl-ref-02a625bc48417a3340b2b4589f444194e44300ac.tar.gz crawl-ref-02a625bc48417a3340b2b4589f444194e44300ac.zip |
Fix [2813672]: Eliminate use of non-standard C function strcasestr().
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10073 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/debug.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 97d244ee9c..474d4f6858 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -1483,7 +1483,9 @@ bool get_item_by_name(item_def *item, char* specs, int index = unrand + UNRAND_START; unrandart_entry* entry = get_unrand_entry(index); - ptr = strcasestr( entry->name, specs ); + strcpy(obj_name, entry->name); + + ptr = strstr( strlwr(obj_name), specs ); if (ptr != NULL && item->base_type == class_wanted) { make_item_unrandart(*item, index); |