Adding the libft
This commit is contained in:
parent
1b98b537b7
commit
c947e43e51
62 changed files with 2098 additions and 19 deletions
|
|
@ -6,14 +6,12 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/30 16:41:32 by rparodi #+# #+# */
|
||||
/* Updated: 2024/10/31 11:23:05 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/10/31 16:54:21 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "cub3d.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
* @brief checking if the args given to the executable is valid
|
||||
*
|
||||
|
|
@ -25,8 +23,8 @@ bool ft_parse_args(int argc, char *argv[])
|
|||
{
|
||||
if (argc != 2)
|
||||
return (print_error(ERR_ARGS_COUNT), false);
|
||||
if (strlen(argv[1]) < 4 || \
|
||||
strcmp((argv[1] + (strlen(argv[1]) - 4)), ".cub") != 0)
|
||||
if (ft_strlen(argv[1]) < 4 || \
|
||||
ft_strcmp((argv[1] + (strlen(argv[1]) - 4)), ".cub") != 0)
|
||||
return (print_error(INV_NAME_MAP), false);
|
||||
return (true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue