- Fix inverted if condition in TEB initialization, spotted by Stefan.
authorAleksey Bragin <aleksey@reactos.org>
Thu, 15 Oct 2009 16:47:26 +0000 (16:47 +0000)
committerAleksey Bragin <aleksey@reactos.org>
Thu, 15 Oct 2009 16:47:26 +0000 (16:47 +0000)
svn path=/trunk/; revision=43479

reactos/ntoskrnl/mm/ARM3/procsup.c

index d64678b..ae711fd 100644 (file)
@@ -655,21 +655,21 @@ MmCreateTeb(IN PEPROCESS Process,
             (InitialTeb->PreviousStackLimit == NULL))
         {
             //
             (InitialTeb->PreviousStackLimit == NULL))
         {
             //
-            // Use grandparent TEB values
+            // Use initial TEB values
             //
             //
-            Teb->Tib.StackBase = InitialTeb->PreviousStackBase;
-            Teb->Tib.StackLimit = InitialTeb->PreviousStackLimit;
+            Teb->Tib.StackBase = InitialTeb->StackBase;
+            Teb->Tib.StackLimit = InitialTeb->StackLimit;
+            Teb->DeallocationStack = InitialTeb->AllocatedStackBase;
         }
         else
         {
             //
         }
         else
         {
             //
-            // Use initial TEB values
+            // Use grandparent TEB values
             //
             //
-            Teb->Tib.StackBase = InitialTeb->StackBase;
-            Teb->Tib.StackLimit = InitialTeb->StackLimit;
-            Teb->DeallocationStack = InitialTeb->AllocatedStackBase;
+            Teb->Tib.StackBase = InitialTeb->PreviousStackBase;
+            Teb->Tib.StackLimit = InitialTeb->PreviousStackLimit;
         }
         }
-        
+
         //
         // Initialize the static unicode string
         //
         //
         // Initialize the static unicode string
         //