aboutsummaryrefslogtreecommitdiff
path: root/convert_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'convert_str.c')
-rw-r--r--convert_str.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/convert_str.c b/convert_str.c
index 5bba1b1..42bf851 100644
--- a/convert_str.c
+++ b/convert_str.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/30 23:22:25 by cacharle #+# #+# */
-/* Updated: 2019/11/05 23:43:57 by cacharle ### ########.fr */
+/* Updated: 2019/11/09 01:07:24 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -18,7 +18,7 @@ char *convert_str(va_list ap, t_pformat *pformat)
str = va_arg(ap, char*);
str = str == NULL ? ft_strdup("(null)") : ft_strdup(str);
- if (pformat->precision != -1 && pformat->precision < (int)ft_strlen(str))
+ if (pformat->precision >= 0 && pformat->precision < (int)ft_strlen(str))
str[pformat->precision] = '\0';
str = handle_width(pformat, str);
return (str);