mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 19:43:31 +08:00
[NTOS:MM] Fix MmspCompareSegments
On x64 the previous implementation would only compare the upper 32 bits and ignore the lower 32 bits.
This commit is contained in:
parent
1a31d8222d
commit
41250d1028
@ -3306,9 +3306,12 @@ MmspCompareSegments(const void * x,
|
||||
const MM_SECTION_SEGMENT *Segment1 = (const MM_SECTION_SEGMENT *)x;
|
||||
const MM_SECTION_SEGMENT *Segment2 = (const MM_SECTION_SEGMENT *)y;
|
||||
|
||||
return
|
||||
(Segment1->Image.VirtualAddress - Segment2->Image.VirtualAddress) >>
|
||||
((sizeof(ULONG_PTR) - sizeof(int)) * 8);
|
||||
if (Segment1->Image.VirtualAddress > Segment2->Image.VirtualAddress)
|
||||
return 1;
|
||||
else if (Segment1->Image.VirtualAddress < Segment2->Image.VirtualAddress)
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user