diff --git a/src/BizHawk.Client.Common/ArgParser.cs b/src/BizHawk.Client.Common/ArgParser.cs index 93320cbbdab..1b1b8f5be97 100644 --- a/src/BizHawk.Client.Common/ArgParser.cs +++ b/src/BizHawk.Client.Common/ArgParser.cs @@ -84,15 +84,10 @@ public static void ParseArguments(out ParsedCLIFlags parsed, string[] args) else if (argDowncased.StartsWithOrdinal("--dump-frames=")) { string list = argDowncased.Substring(argDowncased.IndexOf('=') + 1); - string[] items = list.Split(','); - currAviWriterFrameList = new HashSet(); - foreach (string item in items) - { - currAviWriterFrameList.Add(int.Parse(item)); - } - + currAviWriterFrameList = new(); + currAviWriterFrameList.AddRange(list.Split(',').Select(int.Parse)); // automatically set dump length to maximum frame - autoDumpLength = currAviWriterFrameList.Order().Last(); + autoDumpLength = currAviWriterFrameList.Max(); } else if (argDowncased.StartsWithOrdinal("--version")) {