Skip to content

Commit

Permalink
fix: . int alt form for float
Browse files Browse the repository at this point in the history
  • Loading branch information
savalet committed Oct 30, 2024
1 parent 0e1b2cd commit 5ec6209
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handler/put_float.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ void put_sign(flags_t *flags, double nbr, int copy)
static
int put_point(flags_t *flags, int i)
{
if (flags->precision > 0 || flags->precision == -1) {
if (flags->precision > 0 || flags->precision == -1 ||
flags->flags & FLAGS_ALT_FORM) {
flags->spec_buff.str[i] = '.';
return 1;
}
Expand Down

0 comments on commit 5ec6209

Please sign in to comment.