diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-10-30 04:58:00 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-10-30 04:58:00 +0100 |
| commit | 001786c8ec464b1ae3e6321acfd984227cb1bbee (patch) | |
| tree | 6c71dd227eb8a8c28cd529cb4cfc31879e845831 /convert_str.c | |
| parent | d963161275bcb3af4097872ba033da3ff9255606 (diff) | |
| download | ft_printf-001786c8ec464b1ae3e6321acfd984227cb1bbee.tar.gz ft_printf-001786c8ec464b1ae3e6321acfd984227cb1bbee.tar.bz2 ft_printf-001786c8ec464b1ae3e6321acfd984227cb1bbee.zip | |
Added flags for x and X
Diffstat (limited to 'convert_str.c')
| -rw-r--r-- | convert_str.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
