From b2829ca5223402fb3c5a38cb89e68adf0c5127d9 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sun, 1 Nov 2015 10:35:08 +0100 Subject: [PATCH] Fix plural name for the Array type fixes #10501 --- lib/base/type.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/base/type.cpp b/lib/base/type.cpp index b084cb807..33f6726a1 100644 --- a/lib/base/type.cpp +++ b/lib/base/type.cpp @@ -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";