]> git.dkaiser.de - 42/minishell.git/commitdiff
assigned null to en struct against segfault
authorChristopher Uhlig <chuhlig@1-D-6.42heilbronn.de>
Fri, 25 Oct 2024 13:53:59 +0000 (15:53 +0200)
committerChristopher Uhlig <chuhlig@1-D-6.42heilbronn.de>
Fri, 25 Oct 2024 13:53:59 +0000 (15:53 +0200)
src/main.c

index 64bc31262682c0446d6910cd8638a184d3a6336f..3672fddb39909a3b3ee5481e08e014ba19094180 100644 (file)
@@ -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       */
 /*                                                                            */
 /* ************************************************************************** */
 
 
 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);
 }