diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-09 17:38:54 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-09 17:38:54 +0000 |
commit | c3d3ae5b47bf17d6b38cfb626ef9138d9460dcb7 (patch) | |
tree | bc47b95fa32d6d2825519f95afb1015fef6bafae | |
parent | 393265212cf208291788477e54ca78a5ab81a3db (diff) | |
download | crawl-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
-rw-r--r-- | crawl-ref/source/stash.cc | 6 |
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()); } } } |