Skip to content
Snippets Groups Projects
Commit 00305475 authored by a2-stratford's avatar a2-stratford
Browse files

Fixes issue brought up in merge request by Josh

parent 5eef1694
Branches
No related tags found
1 merge request!5Alex/6 implement populate stack process
......@@ -13,14 +13,13 @@ void populate_stack(void* stackPointer, int argc, char** argv) {
*stackPointer = PHYS_BASE;
int i = argc;
// this array holds reference to differences arguments in the stack
uint32_t * arr[argc];
uint32_t * arr[argc]; // Creates an array to hold arguments in the stack
while (--i >= 0)
{
*stackPointer = *stackPointer - (strlen(argv[i]) + 1) * sizeof(char);
arr[i] = (uint32_t *)*stackPointer;
arr[i] = (uint32_t *)*stackPointer; // Assigns the current reference of the stackpointer to the array
memcpy(*stackPointer, argv[i], strlen(argv[i]) + 1);
}
......@@ -49,7 +48,6 @@ void populate_stack(void* stackPointer, int argc, char** argv) {
}
// Adds the move value to the stack pointer
int move_stack_pointer(void* stackPointer, int moveValue) {
static void move_stack_pointer(void** stackPointer, int moveValue) {
*stackPointer = *stackPointer + moveValue;
return *stackPointer;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment