diff options
Diffstat (limited to '')
| -rw-r--r-- | src/p_lcom_next.c | 17 | 
1 files changed, 11 insertions, 6 deletions
| diff --git a/src/p_lcom_next.c b/src/p_lcom_next.c index f340294..b106032 100644 --- a/src/p_lcom_next.c +++ b/src/p_lcom_next.c @@ -133,11 +133,10 @@ static void  }  static char -	**p_add_to_variables_and_delete( /* t_bool equals[], */ -								char *words[], -								t_bool reg, -								int64_t i, -								t_msh *msh) +	**p_add_to_variables_and_delete(char *words[], +									t_bool reg, +									int64_t i, +									t_msh *msh)  {  	int64_t	j;  	int64_t	k; @@ -184,10 +183,12 @@ char  {  	char	*ptr;  	t_bool	reg; +	t_bool	isvar;  	int64_t	i;  	i = 0;  	reg = TRUE; +	isvar = TRUE;  	while (words[i])  	{  		ptr = words[i]; @@ -196,9 +197,13 @@ char  		if (*ptr == '\0' || words[i][0] == '=')  		{  			reg = FALSE; +			if (i == 0) +				isvar = FALSE;  			break ;  		}  		i++;  	} -	return (p_add_to_variables_and_delete(/* equals, */words, reg, i, msh)); +	if (isvar == TRUE) +		return (p_add_to_variables_and_delete(words, reg, i, msh)); +	return (words);  } | 
