This commit is contained in:
H3XploR
2025-02-25 00:29:49 +01:00
parent d3f205543e
commit f7e6dec6c4
4 changed files with 8 additions and 9 deletions
+5 -6
View File
@@ -6,7 +6,7 @@
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/14 18:28:42 by yantoine #+# #+# */
/* Updated: 2025/02/17 21:07:31 by yantoine ### ########.fr */
/* Updated: 2025/02/25 00:29:27 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,13 +17,12 @@ int check_tokens(char **tokens, int expected)
return (tokens && ft_arraylen(tokens) == expected);
}
void check_if_max(t_scene scene, const int to_test, const int max)
int check_if_max(t_scene scene, const int to_test, const int max)
{
(void)scene;
if (to_test >= max)
{
printf("error:\n");
close(scene.fd_if_exit);
free(scene.line_if_exit);
exit(1);
return (0);
}
return (1);
}