make PE loader more lenient with alignment. it could previously not load PEs that I can load on Windows
Modified: trunk/reactos/ntoskrnl/mm/pe.c

Modified: trunk/reactos/ntoskrnl/mm/pe.c
--- trunk/reactos/ntoskrnl/mm/pe.c	2005-05-26 13:50:52 UTC (rev 15517)
+++ trunk/reactos/ntoskrnl/mm/pe.c	2005-05-26 13:52:30 UTC (rev 15518)
@@ -518,8 +518,8 @@
  /* size of the executable's headers */
  if(RTL_CONTAINS_FIELD(piohOptHeader, cbOptHeaderSize, SizeOfHeaders))
  {
-  if(!IsAligned(piohOptHeader->SizeOfHeaders, nFileAlignment))
-   DIE(("SizeOfHeaders is not aligned\n"));
+  //if(!IsAligned(piohOptHeader->SizeOfHeaders, nFileAlignment))
+   //DIE(("SizeOfHeaders is not aligned\n"));
 
   if(cbSectionHeadersSize > piohOptHeader->SizeOfHeaders)
    DIE(("The section headers overflow SizeOfHeaders\n"));
@@ -611,7 +611,7 @@
  /* initialize the headers segment */
  pssSegments = ImageSectionObject->Segments;
 
- ASSERT(IsAligned(cbHeadersSize, nFileAlignment));
+ //ASSERT(IsAligned(cbHeadersSize, nFileAlignment));
 
  if(!AlignUp(&nFileSizeOfHeaders, cbHeadersSize, nFileAlignment))
   DIE(("Cannot align the size of the section headers\n"));
@@ -655,8 +655,8 @@
     DIE(("SizeOfRawData[%u] is not aligned\n", i));
 #endif
 
-   if(!IsAligned(pishSectionHeaders[i].PointerToRawData, nFileAlignment))
-    DIE(("PointerToRawData[%u] is not aligned\n", i));
+   //if(!IsAligned(pishSectionHeaders[i].PointerToRawData, nFileAlignment))
+    //DIE(("PointerToRawData[%u] is not aligned\n", i));
 
    /* conversion */
    pssSegments[i].FileOffset = pishSectionHeaders[i].PointerToRawData;