- Don't hardcode PEB address
authorAlex Ionescu <aionescu@gmail.com>
Tue, 22 Nov 2005 03:37:39 +0000 (03:37 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Tue, 22 Nov 2005 03:37:39 +0000 (03:37 +0000)
svn path=/trunk/; revision=19448

reactos/lib/ntdll/ldr/startup.c

index 2baddd2..15defad 100644 (file)
@@ -259,7 +259,7 @@ LdrpInit(PCONTEXT Context,
    DPRINT("LdrpInit()\n");
    if (NtCurrentPeb()->Ldr == NULL || NtCurrentPeb()->Ldr->Initialized == FALSE)
      {
    DPRINT("LdrpInit()\n");
    if (NtCurrentPeb()->Ldr == NULL || NtCurrentPeb()->Ldr->Initialized == FALSE)
      {
-       Peb = (PPEB)(PEB_BASE);
+       Peb = NtCurrentPeb();
        DPRINT("Peb %x\n", Peb);
        ImageBase = Peb->ImageBaseAddress;
        DPRINT("ImageBase %x\n", ImageBase);
        DPRINT("Peb %x\n", Peb);
        ImageBase = Peb->ImageBaseAddress;
        DPRINT("ImageBase %x\n", ImageBase);