segfaults have been eliminated

This commit is contained in:
Mthandazo Ndhlovu
2019-04-26 12:00:28 +02:00
parent ba1cea020d
commit 9a386b315b
11 changed files with 65 additions and 49 deletions

View File

@@ -6,7 +6,7 @@
/* By: mndhlovu <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/08 06:42:37 by mndhlovu #+# #+# */
/* Updated: 2019/04/20 13:29:12 by mndhlovu ### ########.fr */
/* Updated: 2019/04/26 10:42:43 by mndhlovu ### ########.fr */
/* */
/* ************************************************************************** */
@@ -51,7 +51,7 @@ int lm_validate_name(char *name)
int lm_validate_rooms(char *name, char *x, char *y)
{
if (lm_validate_name(name) == -1)
return (-1);
return (0);
if (lm_chk_format_nbr(x) == -1 ||
lm_check_max(x) == -1 || (ft_atoi(x) > 0 &&
(ft_atoi(x) == 0)) ||