use max args in all places that need it
This commit is contained in:
parent
50289cd303
commit
d0db730758
@ -85,7 +85,7 @@ void exec() {
|
||||
print_prompt("Please input exec subcommand:\n");
|
||||
|
||||
char *buffer = calloc(100, sizeof(char)); // input buffer size 100
|
||||
char **subcommand = calloc(6, sizeof(char *)); //size 6 to allow for 5 arguments and a null pointer
|
||||
char **subcommand = calloc(MAX_ARGS, sizeof(char *)); //size 6 to allow for 5 arguments and a null pointer
|
||||
for (int i = 0; i < MAX_ARGS; i++) {
|
||||
subcommand[i] = NULL; //make sure each pointer is a null pointer
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user