🔨」 fix: wtf fucking quote

This commit is contained in:
2024-07-06 15:06:03 +02:00
parent 22f7565d47
commit 9bc1c75871
3 changed files with 8 additions and 4 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */ /* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/20 20:06:13 by adjoly #+# #+# */ /* Created: 2024/05/20 20:06:13 by adjoly #+# #+# */
/* Updated: 2024/06/29 13:32:54 by adjoly ### ########.fr */ /* Updated: 2024/07/06 14:52:02 by adjoly ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */ /* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/05 13:48:57 by adjoly #+# #+# */ /* Created: 2024/06/05 13:48:57 by adjoly #+# #+# */
/* Updated: 2024/07/03 11:26:49 by adjoly ### ########.fr */ /* Updated: 2024/07/06 15:04:35 by adjoly ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -21,7 +21,7 @@ size_t __get_len_arg(char *s)
tmp = s; tmp = s;
while (*tmp) while (*tmp)
{ {
if (*tmp == ' ' && !is_inquote(tmp, tmp - s)) if (*tmp == ' ' && is_inquote(s, tmp - s) == FALSE)
break ; break ;
tmp++; tmp++;
} }

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */ /* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/04 15:00:32 by adjoly #+# #+# */ /* Created: 2024/05/04 15:00:32 by adjoly #+# #+# */
/* Updated: 2024/06/29 15:30:47 by adjoly ### ########.fr */ /* Updated: 2024/07/06 15:05:28 by adjoly ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -18,7 +18,11 @@ t_cmd *split_cmd(char *cmd_av, t_cmd *cmd)
char **split; char **split;
split = split_argv(cmd_av); split = split_argv(cmd_av);
if (!split)
return (NULL);
cmd->cmd = ft_strdup(*split); cmd->cmd = ft_strdup(*split);
if (!cmd->cmd)
return (NULL);
cmd->argv = split; cmd->argv = split;
return (cmd); return (cmd);
} }