Fixed RGB parsing

This commit is contained in:
Philippe BLAGOJEVIC
2022-05-04 16:53:38 +02:00
parent a6c61ec557
commit 6000629c17
5 changed files with 12 additions and 26 deletions

View File

@@ -6,7 +6,7 @@
/* By: pblagoje <pblagoje@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/04/15 16:11:24 by pblagoje #+# #+# */
/* Updated: 2022/05/04 12:58:13 by pblagoje ### ########.fr */
/* Updated: 2022/05/04 16:46:11 by pblagoje ### ########.fr */
/* */
/* ************************************************************************** */
@@ -51,19 +51,6 @@ static void set_rgb(int *plan, char **rgb)
*plan = 0 << 24 | r << 16 | g << 8 | b;
}
/*void ft_free_2d(char **str)
{
int i;
i = 0;
while (str && str[i])
{
free(str[i]);
i++;
}
free(str);
}*/
int check_rgb(t_txt *txt, char *elem, char identifier)
{
char **rgb;
@@ -78,5 +65,6 @@ int check_rgb(t_txt *txt, char *elem, char identifier)
set_rgb(&txt->rgb_floor, rgb);
else
set_rgb(&txt->rgb_ceiling, rgb);
mb_free_2d((void **)rgb, ft_strlen_2d(rgb));
return (EXIT_SUCCESS);
}