fix autre invalid read

This commit is contained in:
tom moron
2024-05-05 20:38:05 +02:00
parent 43e4d054b5
commit 28efa75b39

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/09 15:24:36 by tomoron #+# #+# */
/* Updated: 2024/05/05 20:21:43 by tomoron ### ########.fr */
/* Updated: 2024/05/05 20:36:59 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -34,7 +34,10 @@ int get_var_len(char **command, t_env *env)
return (0);
}
if (!**command)
{
(*command)--;
return (1);
}
if (!ft_isalnum(**command) && **command != '_' && **command != '?')
return (2);
if (**command == '?')