Skip to content

Commit 003c17a

Browse files
author
Emile Joubert
committed
Cure off-by-one error in IntAllocator
1 parent d0454c0 commit 003c17a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public int Allocate()
155155
return unsorted[--unsortedCount];
156156
} else if (Base != null) {
157157
int result = Base.Start++;
158-
if(Base.Start == Base.End) Base = Base.Next;
158+
if(Base.Start > Base.End) Base = Base.Next;
159159
return result;
160160
} else {
161161
return -1;

0 commit comments

Comments
 (0)