Skip to content

Commit

Permalink
Float format long values, re issue #658
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Jan 19, 2025
1 parent 02ad44f commit f659668
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/bif_format.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ bool do_format(query *q, cell *str, pl_idx str_ctx, cell *p1, pl_idx p1_ctx, cel
return throw_error(q, c, q->st.curr_frame, "type_error", "float");
}

len = argval || argval_specified ? argval : 40;
len = argval;
if (len <= 40) len = 40;
CHECK_BUF(len);

if (argval || argval_specified) {
Expand All @@ -444,7 +445,8 @@ bool do_format(query *q, cell *str, pl_idx str_ctx, cell *p1, pl_idx p1_ctx, cel
return throw_error(q, c, q->st.curr_frame, "type_error", "float");
}

len = argval || argval_specified ? argval : 40;
len = argval;
if (len <= 40) len = 40;
CHECK_BUF(len);

if (argval || argval_specified) {
Expand All @@ -467,7 +469,8 @@ bool do_format(query *q, cell *str, pl_idx str_ctx, cell *p1, pl_idx p1_ctx, cel
return throw_error(q, c, q->st.curr_frame, "type_error", "float");
}

len = argval || argval_specified ? argval : 40;
len = argval;
if (len <= 40) len = 40;
CHECK_BUF(len);

if (argval || argval_specified)
Expand Down

0 comments on commit f659668

Please sign in to comment.