diff options
Diffstat (limited to 'convert_uint.c')
| -rw-r--r-- | convert_uint.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/convert_uint.c b/convert_uint.c index 239e47d..a3f5575 100644 --- a/convert_uint.c +++ b/convert_uint.c @@ -1,9 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* convert_uint.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/10/30 23:25:40 by cacharle #+# #+# */ +/* Updated: 2019/10/30 23:26:05 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include <stdarg.h> #include "header.h" char *convert_uint(va_list ap, t_pformat *pformat) { - long long unsigned int n; + char *str; + long long unsigned int n; if (pformat->flags & FLAG_SHORT) n = va_arg(ap, int); @@ -15,7 +28,7 @@ char *convert_uint(va_list ap, t_pformat *pformat) n = va_arg(ap, long long unsigned int); else n = va_arg(ap, unsigned int); - char *str = ft_itoa_unsigned_base(n, "0123456789"); + str = ft_itoa_unsigned_base(n, "0123456789"); str = handle_precision(pformat, str); str = handle_padding(pformat, str); return (str); |
