1
0
mirror of https://github.com/KeyZox71/ft_minipowershell.git synced 2025-05-13 16:08:45 +02:00

🔨」 fix: fixed quote in $

This commit is contained in:
2024-07-15 18:19:07 +02:00
parent ab8177a419
commit 4f56de1c24
3 changed files with 15 additions and 5 deletions

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/03 10:50:52 by mmoussou #+# #+# */
/* Updated: 2024/07/15 14:25:01 by adjoly ### ########.fr */
/* Updated: 2024/07/15 18:17:50 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -38,6 +38,16 @@ char *format_quotes_string(char *cmd)
ft_strlcat(ret, tmp + 1, ft_strlen(ret) + inquote);
tmp += inquote;
}
else if (*tmp == -1)
{
ft_strlcat(ret, "\'", ft_strlen(ret) + 2);
tmp++;
}
else if (*tmp == -1)
{
ft_strlcat(ret, "\"", ft_strlen(ret) + 2);
tmp++;
}
else
{
ft_strlcat(ret, tmp, ft_strlen(ret) + 2);