diff --git a/src/Moniker/NameGenerator.cs b/src/Moniker/NameGenerator.cs index d282335..c74ddf3 100644 --- a/src/Moniker/NameGenerator.cs +++ b/src/Moniker/NameGenerator.cs @@ -60,12 +60,14 @@ private static string BuildNamePair( string result; var (disallowedAdjective, disallowedNoun) = disallowed; + var disallowedResult = $"{disallowedAdjective}{delimiter}{disallowedNoun}"; + do { var adjective = GetRandomEntry(adjectives); var noun = GetRandomEntry(nouns); result = $"{adjective}{delimiter}{noun}"; - } while (result == $"{disallowedAdjective}{delimiter}{disallowedNoun}"); + } while (result == disallowedResult); return result; }