Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benoit
minishell
Commits
fa404a47
Commit
fa404a47
authored
Feb 02, 2021
by
abenoit
Browse files
exit no args fix
parent
94a50b82
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/execution/launch_command.c
View file @
fa404a47
...
...
@@ -5,9 +5,12 @@ static int launch_exit(char **args, t_xe *xe)
{
if
(
args
!=
NULL
)
{
if
(
ft_arraylen
(
args
)
!=
2
)
if
(
ft_arraylen
(
args
)
>
2
)
return
(
EXIT_ARG_ERR
);
xe
->
stat_loc
=
ft_atoi
(
args
[
1
])
%
256
;
if
(
args
[
1
]
!=
NULL
)
xe
->
stat_loc
=
ft_atoi
(
args
[
1
])
%
256
;
else
xe
->
stat_loc
=
0
;
}
return
(
FT_EXIT
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment