Fix ternary null input

Having a ternary result in null creates a new param of []{ null },
instead of a true null.
This commit is contained in:
Kurt
2015-11-25 18:27:49 -08:00
parent 03a773f9bb
commit 8a2e7f3f74

View File

@@ -450,7 +450,7 @@ internal static List<cbItem> getCBList(string textfile, string lang)
internal static List<cbItem> getCBList(string[] inStrings, params int[][] allowed)
{
List<cbItem> cbList = new List<cbItem>();
if (allowed == null)
if (allowed == null || allowed.First() == null)
allowed = new[] { Enumerable.Range(0, inStrings.Length).ToArray() };
foreach (int[] list in allowed)