Skip to content

Commit

Permalink
fix: space flags on float
Browse files Browse the repository at this point in the history
  • Loading branch information
savalet committed Oct 30, 2024
1 parent 11d1df1 commit 0e1b2cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/handler/put_float.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ void inf_or_nan(double nbr, flags_t *flags)
static
void put_sign(flags_t *flags, double nbr, int copy)
{
if (flags->flags & FLAGS_SET_SPACE) {
flags->prefix_buff.str = " ";
flags->prefix_buff.count = 1;
}
if (flags->flags & FLAGS_PUT_SIGN) {
flags->prefix_buff.str = "+";
flags->prefix_buff.count = 1;
Expand Down

0 comments on commit 0e1b2cd

Please sign in to comment.