can't figure out why it returns wrong value
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/09 15:26:01 by tomoron #+# #+# */
|
||||
/* Updated: 2024/03/23 19:23:50 by marde-vr ### ########.fr */
|
||||
/* Updated: 2024/03/24 08:50:11 by marde-vr ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
#include "minishell.h"
|
||||
@ -54,7 +54,7 @@ char *get_token(char **cmd, int *in_quote, int *in_dquote, t_env *env)
|
||||
else if (**cmd == '~' && !*in_quote && !*in_dquote)
|
||||
i += add_home_to_str(res + i);
|
||||
else if (((**cmd == '\'' && *in_dquote) || (**cmd == '"' && *in_quote))
|
||||
|| (**cmd != '\'' && **cmd != '"'))
|
||||
|| (**cmd != '\'' && **cmd != '"'))
|
||||
res[i++] = **cmd;
|
||||
(*cmd)++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user