aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Uhlig2024-10-25 15:53:59 +0200
committerChristopher Uhlig2024-10-25 15:53:59 +0200
commit46003a3dcff9f8cdbc89f0c371785fe3715b0769 (patch)
treefa5ab0816119a5c1f946e64d4722b13d22a9a6b7
parentcecb3e3560c395f2355a068624a7f6ca3d6b5655 (diff)
downloadminishell-46003a3dcff9f8cdbc89f0c371785fe3715b0769.tar.gz
minishell-46003a3dcff9f8cdbc89f0c371785fe3715b0769.zip
assigned null to en struct against segfault
-rw-r--r--src/main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 64bc312..3672fdd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/22 17:14:03 by dkaiser #+# #+# */
-/* Updated: 2024/10/17 15:34:02 by dkaiser ### ########.fr */
+/* Updated: 2024/10/25 15:53:10 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,11 +14,13 @@
int main(int argc, char *argv[], char *envp[])
{
- t_env *env;
+ t_env *env;
+
+ env = NULL;
if (!argc && !argv)
return (1);
if (init())
return (1);
getenvlst(&env, envp);
- repl("Minishell $ ", env);
+ repl("Minishell $ ", &env);
}