fixed lm_check_errors

This commit is contained in:
Mthandazo Ndhlovu 2019-04-22 09:56:09 +02:00
parent bfb125f503
commit c6339a00e9

View File

@ -3,10 +3,10 @@
/* ::: :::::::: */ /* ::: :::::::: */
/* lm_check_errors.c :+: :+: :+: */ /* lm_check_errors.c :+: :+: :+: */
/* +:+ +:+ +:+ */ /* +:+ +:+ +:+ */
/* By: mndhlovu <marvin@42.fr> +#+ +:+ +#+ */ /* By: mndhlovu <mndhlovu@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/02 08:39:09 by mndhlovu #+# #+# */ /* Created: 2019/04/22 08:55:30 by mndhlovu #+# #+# */
/* Updated: 2019/04/20 13:18:54 by mndhlovu ### ########.fr */ /* Updated: 2019/04/22 09:55:46 by mndhlovu ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -34,7 +34,7 @@ int lm_check_forbiden_chars(char *line, int flag)
hash = ft_strchr(line, '#'); hash = ft_strchr(line, '#');
if (flag == 0 && dash == NULL && hash == NULL) if (flag == 0 && dash == NULL && hash == NULL)
return (1); return (1);
if (flag = 1 && dash == NULL && hash != NULL) if (flag == 1 && dash == NULL && hash != NULL)
return (1); return (1);
if (flag == 2 && dash == NULL && (hash == NULL || (hash != NULL && line[1] != '#'))) if (flag == 2 && dash == NULL && (hash == NULL || (hash != NULL && line[1] != '#')))
return (1); return (1);