-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcheck_spaces.c
27 lines (24 loc) · 1.06 KB
/
check_spaces.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* check_spaces.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: majjig <majjig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/12 17:37:11 by majjig #+# #+# */
/* Updated: 2021/12/12 17:37:12 by majjig ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
void check_spaces(char *str)
{
int i;
i = 0;
while (str[i])
{
if (str[i] == '\n')
if (str[i + 1] == '\n' && str[i + 2] != 0)
ft_exit(NO_RECTANGLE);
i++;
}
}