Skip to content

Commit 0b9d036

Browse files
committed
Add base case for FindCommonPrefix for when names.Count is 0
1 parent a420fa4 commit 0b9d036

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sources/SilkTouch/SilkTouch/Naming/NameUtils.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ public static string FindCommonPrefix(
127127
bool naive = false
128128
)
129129
{
130+
if (names.Count == 0)
131+
{
132+
return "";
133+
}
134+
130135
var pos = 0;
131136
var foundPrefix = "";
132137
var minLen = names.Min(x => x.Length);

0 commit comments

Comments
 (0)