[NTOS]: Fix a loop off-by-one when saving the page table index in contigious memory...
authorSir Richard <sir_richard@svn.reactos.org>
Sun, 6 Jun 2010 13:42:19 +0000 (13:42 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Sun, 6 Jun 2010 13:42:19 +0000 (13:42 +0000)
svn path=/trunk/; revision=47620

reactos/ntoskrnl/mm/ARM3/contmem.c

index 2f3eda9..94c8650 100644 (file)
@@ -352,8 +352,8 @@ MiFindContiguousMemory(IN PFN_NUMBER LowestPfn,
     do
     {
         /* Write the PTE address */
     do
     {
         /* Write the PTE address */
-        Pfn1->PteAddress = PointerPte++;
-        Pfn1->u4.PteFrame = PFN_FROM_PTE(MiAddressToPte(PointerPte));
+        Pfn1->PteAddress = PointerPte;
+        Pfn1->u4.PteFrame = PFN_FROM_PTE(MiAddressToPte(PointerPte++));
     } while (Pfn1++ < EndPfn);
     
     /* Return the address */
     } while (Pfn1++ < EndPfn);
     
     /* Return the address */