diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-10-30 18:07:21 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-10-30 18:07:21 +0100 |
| commit | 22f334a19cabebf10727d7894102946ba23d0e37 (patch) | |
| tree | fd323ff0dbb8fc06a00c8c26dfc6fbd3b5ae0910 /parse.c | |
| parent | 001786c8ec464b1ae3e6321acfd984227cb1bbee (diff) | |
| download | ft_printf-22f334a19cabebf10727d7894102946ba23d0e37.tar.gz ft_printf-22f334a19cabebf10727d7894102946ba23d0e37.tar.bz2 ft_printf-22f334a19cabebf10727d7894102946ba23d0e37.zip | |
Fixed %d segfault, merge hex_* in hex, fixed c = 0
Diffstat (limited to 'parse.c')
| -rw-r--r-- | parse.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/29 00:11:33 by cacharle #+# #+# */ -/* Updated: 2019/10/30 04:13:56 by cacharle ### ########.fr */ +/* Updated: 2019/10/30 17:02:09 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,7 +35,7 @@ int parse(char *format, t_flist **flist) if ((tmp = list_new(parsed)) == NULL) return ((int)list_destroy(flist)); list_push_front(flist, tmp); - format += (*flist)->content->len; + format += (*flist)->content->fmt_len; } *flist = list_reverse(*flist); return (1); @@ -58,9 +58,9 @@ t_pformat *parse_reduced(char *fmt) pformat->precision = -1; pformat->min_width = -1; pformat->flags = 0; - pformat->len = ft_strlen(fmt); - pformat->type = fmt[pformat->len - 1]; - fmt[pformat->len - 1] = '\0'; + pformat->fmt_len = ft_strlen(fmt); + pformat->type = fmt[pformat->fmt_len - 1]; + fmt[pformat->fmt_len - 1] = '\0'; fmt = extract_standalone_flags(pformat, fmt); fmt = extract_min_width(pformat, fmt); fmt = extract_precision(pformat, fmt); |
