fix(main): decalre args upstream

This commit is contained in:
Ahurac 2024-11-08 11:49:39 +01:00
parent 7b1b49c2d1
commit 5b18608b26

View file

@ -8,16 +8,19 @@
int main() {
char *input_line;
unsigned char exit_code = 0;
struct Args args;
while (1) {
args.argc = 0;
printf("$ ");
input_line = read_a_line(stdin);
if (input_line == NULL) {
return exit_code;
}
struct Args args = parse(input_line);
} else {
args = parse(input_line);
free(input_line);
}
if (args.argc > 0) {
exit_code = invoke(args);