diff --git a/reactos/lib/rtl/heap.c b/reactos/lib/rtl/heap.c index fb70cb60384..6c6e0d29712 100644 --- a/reactos/lib/rtl/heap.c +++ b/reactos/lib/rtl/heap.c @@ -510,7 +510,7 @@ RtlpCreateUnCommittedRange(PHEAP_SEGMENT Segment) } /* There is a whole bunch of new UCR descriptors. Put them into the unused list */ - while ((PCHAR)(UcrDescriptor + 1) < (PCHAR)UcrSegment + UcrSegment->CommittedSize) + while ((PCHAR)(UcrDescriptor + 1) <= (PCHAR)UcrSegment + UcrSegment->CommittedSize) { InsertTailList(&Heap->UCRList, &UcrDescriptor->ListEntry); UcrDescriptor++;