Skip to content

Commit

Permalink
fixing is_not_duplicated, if the future_pos is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
biralavor committed Jun 28, 2024
1 parent 158e172 commit b514883
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions program_to_test/src/ft_argv_validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: umeneses <umeneses@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/03 11:43:20 by umeneses #+# #+# */
/* Updated: 2024/06/27 16:58:34 by umeneses ### ########.fr */
/* Updated: 2024/06/28 12:27:49 by umeneses ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -39,7 +39,8 @@ bool ft_argv_is_not_duplicated(char **argv)
{
after_atoi = ft_atoi(argv[index]);
future_pos = 1;
while ((++future_pos <= ft_argv_size(argv)) && (future_pos != index))
while ((++future_pos <= ft_argv_size(argv)) && (future_pos != index)
&& compare[future_pos] != NULL)
{
if (ft_atoi(compare[future_pos]) == after_atoi)
return (false);
Expand Down

0 comments on commit b514883

Please sign in to comment.