aboutsummaryrefslogtreecommitdiff
path: root/ft_putnbr_fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ft_putnbr_fd.c')
-rw-r--r--ft_putnbr_fd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ft_putnbr_fd.c b/ft_putnbr_fd.c
index db91e06..562d289 100644
--- a/ft_putnbr_fd.c
+++ b/ft_putnbr_fd.c
@@ -11,12 +11,15 @@
/* ************************************************************************** */
#include <unistd.h>
+#include <limits.h>
#include "libft.h"
void ft_putnbr_fd(int n, int fd)
{
unsigned int p_n;
+ if (fd < 0 || fd > OPEN_MAX)
+ return ;
p_n = n;
if (n < 0)
{