summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stash.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-09 17:38:54 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-09 17:38:54 +0000
commitc3d3ae5b47bf17d6b38cfb626ef9138d9460dcb7 (patch)
treebc47b95fa32d6d2825519f95afb1015fef6bafae /crawl-ref/source/stash.cc
parent393265212cf208291788477e54ca78a5ab81a3db (diff)
downloadcrawl-ref-c3d3ae5b47bf17d6b38cfb626ef9138d9460dcb7.tar.gz
crawl-ref-c3d3ae5b47bf17d6b38cfb626ef9138d9460dcb7.zip
Don't give an empty Stash: line when describing squares which have an
empty stash. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9015 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stash.cc')
-rw-r--r--crawl-ref/source/stash.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index 34d816657d..d9aa7e1a48 100644
--- a/crawl-ref/source/stash.cc
+++ b/crawl-ref/source/stash.cc
@@ -120,9 +120,9 @@ void describe_stash(int x, int y)
Stash *s = ls->find_stash(x, y);
if (s)
{
- std::string desc = "[Stash: "
- + s->description() + "]";
- mpr(desc.c_str(), MSGCH_EXAMINE_FILTER);
+ const std::string desc = s->description();
+ if (!desc.empty())
+ mprf(MSGCH_EXAMINE_FILTER, "[Stash: %s]", desc.c_str());
}
}
}