Fix bug in stack creation which would count one extra argument for argc
This commit is contained in:
@@ -102,7 +102,7 @@ start_process (void *file_name_)
|
|||||||
struct list arg_list;
|
struct list arg_list;
|
||||||
list_init (&arg_list);
|
list_init (&arg_list);
|
||||||
|
|
||||||
int arg_count = 1;
|
int arg_count = 0;
|
||||||
while (arg != NULL)
|
while (arg != NULL)
|
||||||
{
|
{
|
||||||
push_to_stack (&if_.esp, arg, (strlen (arg) + 1) * sizeof (char));
|
push_to_stack (&if_.esp, arg, (strlen (arg) + 1) * sizeof (char));
|
||||||
|
|||||||
Reference in New Issue
Block a user