Fixed return val

This commit is contained in:
Timo Schmidt 2023-04-03 19:38:15 +02:00
parent 2815b96f25
commit cadbe60693
1 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@
/* By: tosuman </var/spool/mail/tosuman> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/30 20:55:05 by tosuman #+# #+# */
/* Updated: 2023/03/30 20:55:06 by tosuman ### ########.fr */
/* Updated: 2023/04/03 19:36:46 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
@ -20,9 +20,11 @@ int ft_ultimate_range(int **range, int min, int max)
if (min >= max)
{
*range = NULL;
return (-1);
return (0);
}
*range = malloc(sizeof(int) * (max - min));
if (*range == NULL)
return (-1);
idx = -1;
while (++idx < max - min)
range[0][idx] = idx + min;