Skip to content

Commit

Permalink
Fix GetReservedPortRange
Browse files Browse the repository at this point in the history
  • Loading branch information
chsbuffer committed Oct 1, 2021
1 parent 7ce1127 commit a7756da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Netch/Utils/PortHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static void GetReservedPortRange(PortType portType, ref List<NumberRange
foreach (var line in output.SplitRemoveEmptyEntriesAndTrimEntries('\n'))
{
var value = line.Trim().SplitRemoveEmptyEntries(' ');
if (value.Length != 2)
if (value.Length < 2)
continue;

if (!ushort.TryParse(value[0], out var start) || !ushort.TryParse(value[1], out var end))
Expand Down

0 comments on commit a7756da

Please sign in to comment.