From a39a1b47d5775404cd0357d105e132c3c69fa545 Mon Sep 17 00:00:00 2001 From: salad Date: Mon, 26 Oct 2020 14:31:44 +0100 Subject: ARG_MAX DE MES DEUX BOULES --- src/u_path.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/u_path.c') diff --git a/src/u_path.c b/src/u_path.c index b43946f..a682a75 100644 --- a/src/u_path.c +++ b/src/u_path.c @@ -13,7 +13,9 @@ #include #include #include -#include +#include + +/* TODO: ARG_MAX ????? */ #include "s_struct.h" #include "u_vars.h" @@ -42,11 +44,11 @@ uint8_t u_search_in_path(char fullpath[], t_msh *msh) { struct dirent *ent; - char tmp[ARG_MAX]; + char tmp[131072]; char *tok_path; DIR *dir; - if (u_get_var_value(tmp, "$PATH", ARG_MAX, msh) != 0) + if (u_get_var_value(tmp, "$PATH", 131072, msh) != 0) return (1); tok_path = ft_strtok(tmp, ":"); while (tok_path != NULL) -- cgit v1.2.3