diff options
Diffstat (limited to 'parse/parse_resolution.c')
| -rw-r--r-- | parse/parse_resolution.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/parse/parse_resolution.c b/parse/parse_resolution.c index c8e0c7f..e63317e 100644 --- a/parse/parse_resolution.c +++ b/parse/parse_resolution.c @@ -1,9 +1,21 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* parse_resolution.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/11/15 09:29:27 by cacharle #+# #+# */ +/* Updated: 2019/11/15 09:31:47 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "cub3d.h" -t_bool parse_resolution(t_parsing *parsing, char *line) +t_bool parse_resolution(t_parsing *parsing, char *line) { parsing->resolution_width = ft_atoi(line); - line = ft_strchr(line, ' '); + line = ft_strrchr(line, ' ') + 1; parsing->resolution_height = ft_atoi(line); return (TRUE); } |
