From 001786c8ec464b1ae3e6321acfd984227cb1bbee Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 30 Oct 2019 04:58:00 +0100 Subject: Added flags for x and X --- convert_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'convert_str.c') diff --git a/convert_str.c b/convert_str.c index dbdf01e..3cea2dc 100644 --- a/convert_str.c +++ b/convert_str.c @@ -7,7 +7,7 @@ char *convert_str(va_list ap, t_pformat *pformat) str = str == NULL ? ft_strdup("(null)") : ft_strdup(str); - if (pformat->precision != -1 && pformat->precision < ft_strlen(str)) + if (pformat->precision != -1 && pformat->precision < (int)ft_strlen(str)) str[pformat->precision] = '\0'; str = handle_padding(pformat, str); -- cgit