summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_item.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-08-09 22:54:16 +0200
committerAdam Borowski <kilobyte@angband.pl>2011-08-10 16:42:58 +0200
commit40501e87a23ee80d3e948b9d9232e7fdcf46108f (patch)
tree22a508769cdbbe99f375ca5fd60c6fd6bc8b2120 /crawl-ref/source/l_item.cc
parent224edcce586cdb9ca41cadd76d54b5ac4b34a2cd (diff)
downloadcrawl-ref-40501e87a23ee80d3e948b9d9232e7fdcf46108f.tar.gz
crawl-ref-40501e87a23ee80d3e948b9d9232e7fdcf46108f.zip
Fix a std::string.c_str() going out of scope crash.
There's no point in using a std::string here at all.
Diffstat (limited to 'crawl-ref/source/l_item.cc')
-rw-r--r--crawl-ref/source/l_item.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/l_item.cc b/crawl-ref/source/l_item.cc
index b6f02654e0..288b1fe751 100644
--- a/crawl-ref/source/l_item.cc
+++ b/crawl-ref/source/l_item.cc
@@ -292,7 +292,7 @@ static int l_item_do_subtype (lua_State *ls)
{
const char *s = NULL;
if (item->base_type == OBJ_ARMOUR)
- s = item_slot_name(get_armour_slot(*item), true).c_str();
+ s = item_slot_name(get_armour_slot(*item), true);
if (item_type_known(*item))
{
if (item->base_type == OBJ_JEWELLERY)