🔨」 fix: fixed quote in $

This commit is contained in:
KeyZox committed 2024-07-15 18:19:20 +02:00
1 parent ab8177a419
commit 4f56de1c24
3 files changed
+15 -5

No files matched your search

+11 -1
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);