summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-15 20:29:45 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-15 20:29:45 +0000
commit90fe4dad67ff1d0b0316ff0492711598291b4b13 (patch)
treeab2a61101fbfcfbfcc7523537b85228736746e5f
parent1dbb0292f25602f8158b666783d68bbd35e1c9e2 (diff)
downloadcrawl-ref-90fe4dad67ff1d0b0316ff0492711598291b4b13.tar.gz
crawl-ref-90fe4dad67ff1d0b0316ff0492711598291b4b13.zip
[1914525] Fixed pluralisation of branded missiles in the quiver.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3659 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/libutil.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index afeff90058..542bbbc162 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -295,6 +295,10 @@ std::string pluralise(const std::string &name,
return pluralise(name.substr(0, pos)) + name.substr(pos);
}
}
+
+ if (!name.empty() && name[name.length() - 1] == ')'
+ && (pos = name.rfind(" (")) != std::string::npos)
+ return (pluralise(name.substr(0, pos)) + name.substr(pos));
if (ends_with(name, "us"))
// Fungus, ufetubus, for instance.