Fix plural name for the Array type

fixes #10501
This commit is contained in:
Gunnar Beutner 2015-11-01 10:35:08 +01:00
parent 1b9f0a8c77
commit b2829ca522
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ String Type::GetPluralName(void) const
{
String name = GetName();
if (name[name.GetLength() - 1] == 'y')
if (name.GetLength() >= 2 && name[name.GetLength() - 1] == 'y' &&
name.SubStr(name.GetLength() - 2, 1).FindFirstOf("aeiou") == String::NPos)
return name.SubStr(0, name.GetLength() - 1) + "ies";
else
return name + "s";