invalid maps
This commit is contained in:
28
srcs/lm_check_errors.c
Normal file
28
srcs/lm_check_errors.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* lm_check_errors.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mndhlovu <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/04/02 08:39:09 by mndhlovu #+# #+# */
|
||||
/* Updated: 2019/04/02 08:39:22 by mndhlovu ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "lem_in.h"
|
||||
|
||||
int lm_check_room_before(char **tab, t_syntax *synt)
|
||||
{
|
||||
if ((ft_atoi(tab[1]) > INT_MIN && ft_atoi(tab[1]) < INT_MAX)
|
||||
&& (ft_atoi(tab[2]) > INT_MIN && ft_atoi(tab[2]) < INT_MAX)
|
||||
&& !(*tab[0] == 'L' || *tab[0] == '#'))
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
else
|
||||
{
|
||||
synt->error = 1;
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user