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_ptr.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_ptr.c')
| -rw-r--r-- | convert_ptr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/convert_ptr.c b/convert_ptr.c index c74222c..2c288ac 100644 --- a/convert_ptr.c +++ b/convert_ptr.c @@ -1,9 +1,10 @@ #include <stdarg.h> +#include <stdlib.h> #include "header.h" char *convert_ptr(va_list ap, t_pformat *pformat) { - char *str = ITOA_HEX_LOW(va_arg(ap, void*)); + char *str = ITOA_HEX_LOW((long long unsigned int)va_arg(ap, void*)); str = handle_precision(pformat, str); str = add_hex_prefix(str); |
