diff options
Diffstat (limited to 'extract.c')
| -rw-r--r-- | extract.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/29 00:10:36 by cacharle #+# #+# */ -/* Updated: 2019/10/29 00:11:02 by cacharle ### ########.fr */ +/* Updated: 2019/10/29 18:17:38 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,6 +23,8 @@ char *extract_standalone_flags(t_pformat *pformat, char *fmt) pformat->flags |= FLAG_ZERO_PADDING; if (*fmt == '-') pformat->flags |= FLAG_LEFT_ADJUSTED; + if (*fmt == '+') + pformat->flags |= FLAG_SIGNED; fmt++; } return (fmt); @@ -51,6 +53,7 @@ char *extract_precision(t_pformat *pformat, char *fmt) { if (*fmt == 0 || *fmt != '.') return (fmt); + pformat->flags &= ~FLAG_ZERO_PADDING; fmt++; if (*fmt == '*') { |
