fix autre invalid read
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/09 15:24:36 by tomoron #+# #+# */
|
/* 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);
|
return (0);
|
||||||
}
|
}
|
||||||
if (!**command)
|
if (!**command)
|
||||||
|
{
|
||||||
|
(*command)--;
|
||||||
return (1);
|
return (1);
|
||||||
|
}
|
||||||
if (!ft_isalnum(**command) && **command != '_' && **command != '?')
|
if (!ft_isalnum(**command) && **command != '_' && **command != '?')
|
||||||
return (2);
|
return (2);
|
||||||
if (**command == '?')
|
if (**command == '?')
|
||||||
|
Reference in New Issue
Block a user