Skip to content

Commit e40cfe9

Browse files
author
Matthew Sackman
committed
Merging bug 22334 into default
2 parents da62cc0 + 38eb747 commit e40cfe9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/client/RabbitMQ.Client/src/util/IntAllocator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public static IntervalList Merge(IntervalList x, IntervalList y)
120120

121121
public static IntervalList FromArray(int[] xs, int length)
122122
{
123-
Array.Sort(xs);
123+
Array.Sort(xs, 0, length);
124124

125125
IntervalList result = null;
126126
IntervalList current = null;
@@ -131,7 +131,7 @@ public static IntervalList FromArray(int[] xs, int length)
131131
while((i < length - 1) && (xs[i + 1] == xs[i] + 1))
132132
i++;
133133

134-
IntervalList interval = new IntervalList(start, i);
134+
IntervalList interval = new IntervalList(xs[start], xs[i]);
135135

136136
if(result == null)
137137
{

0 commit comments

Comments
 (0)