Fix stack initialization to correctness of passing argument tests #28

Closed
td1223 wants to merge 6 commits from user-programs-stdout into user-programs
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 26ae7ac02e - Show all commits

View File

@@ -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));