aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/load.c
diff options
context:
space:
mode:
authorMarvin Borner2021-03-20 18:46:33 +0100
committerMarvin Borner2021-03-20 18:46:33 +0100
commit635751fc2a75f66d1541469b3204efb1701bd91c (patch)
tree2cb5ac0484acb2427504b681a021d6c2fe19d0f8 /kernel/features/load.c
parentc97a50ba7baa70b40431594f410ca18e14af3b76 (diff)
Even more fixes! :^)
Diffstat (limited to 'kernel/features/load.c')
-rw-r--r--kernel/features/load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/features/load.c b/kernel/features/load.c
index 079cbbe..d3f3495 100644
--- a/kernel/features/load.c
+++ b/kernel/features/load.c
@@ -119,8 +119,8 @@ s32 elf_load(const char *path, struct proc *proc)
memory_switch_dir(proc->page_dir);
u32 stack = (u32)memory_alloc(proc->page_dir, PROC_STACK_SIZE, MEMORY_USER | MEMORY_CLEAR);
- proc->regs.ebp = stack + PROC_STACK_SIZE - 1;
- proc->regs.useresp = stack + PROC_STACK_SIZE - 1;
+ proc->regs.ebp = stack + PROC_STACK_SIZE;
+ proc->regs.useresp = stack + PROC_STACK_SIZE;
proc->regs.eip = header.entry;
proc->entry = header.entry;