From 679b5dced1d73d9284bab8965e2f3bf37b3056f4 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 30 Jan 2020 14:18:41 +0100 Subject: fixed ceilling/floor color --- parse/parse_color.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'parse/parse_color.c') diff --git a/parse/parse_color.c b/parse/parse_color.c index f602706..fd482e5 100644 --- a/parse/parse_color.c +++ b/parse/parse_color.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/11 09:52:34 by cacharle #+# #+# */ -/* Updated: 2020/01/11 10:14:29 by cacharle ### ########.fr */ +/* Updated: 2020/01/30 14:17:37 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,8 +16,8 @@ t_bool parse_ceilling_color(t_state *state, char *line) { int tmp; - line++; - if ((tmp = ft_atoi(line)) > 255 || tmp < 0) + state->ceilling_color.hexcode = 0x0; + if ((tmp = ft_atoi(line)) > 255 || tmp < 0) // cant do atoi due to overflow stuff, use ft_strtol return (FALSE); state->ceilling_color.rgb.r = (t_byte)tmp; if ((line = ft_strchr(line, ',') + 1) == NULL) @@ -37,7 +37,7 @@ t_bool parse_floor_color(t_state *state, char *line) { int tmp; - line++; + state->floor_color.hexcode = 0x0; if ((tmp = ft_atoi(line)) > 255 || tmp < 0) return (FALSE); state->floor_color.rgb.r = (t_byte)tmp; -- cgit