mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00: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
1 changed files with 6 additions and 3 deletions
|
@ -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 a new issue