DEBOGAGE
This commit is contained in:
+6
-6
@@ -6,24 +6,24 @@
|
||||
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/14 20:23:21 by yantoine #+# #+# */
|
||||
/* Updated: 2025/02/14 20:48:49 by yantoine ### ########.fr */
|
||||
/* Updated: 2025/02/17 21:34:12 by yantoine ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "miniRT.h"
|
||||
|
||||
|
||||
inline char **get_tokens_secure(t_scene scene, const int numObject, const int numObjectMax, const int supposed_nb_token)
|
||||
char **get_tokens_secure(t_scene scene, const int numObject, const int numObjectMax, const int supposed_nb_token)
|
||||
{
|
||||
const int result_if_max = check_if_max(scene, numObject, numObjectMax);
|
||||
const char **tokens = ft_split(scene.line_if_exit, ' ');
|
||||
char **tokens;
|
||||
|
||||
check_if_max(scene, numObject, numObjectMax);
|
||||
tokens = ft_split(scene.line_if_exit, ' ');
|
||||
if (!check_tokens(tokens, supposed_nb_token))
|
||||
{
|
||||
ft_free_array(tokens);
|
||||
ft_putendl_fd("error", 2);
|
||||
free(scene.line_if_exit);
|
||||
close(scene.fd);
|
||||
close(scene.fd_if_exit);
|
||||
exit(1);
|
||||
}
|
||||
return (tokens);
|
||||
|
||||
Reference in New Issue
Block a user