Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Convert pystrtod.c
  • Loading branch information
sobolevn committed Feb 9, 2023
commit c7dd34886e67838edb0124b8f77b824525697e28
3 changes: 2 additions & 1 deletion Python/pystrtod.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,8 @@ format_float_short(double d, char format_code,
/* Now that we've done zero padding, add an exponent if needed. */
if (use_exp) {
*p++ = float_strings[OFS_E][0];
exp_len = sprintf(p, "%+.02d", exp);
/* See `bufsize` comments for the size argument. */
exp_len = PyOS_snprintf(p, 5, "%+.02d", exp);
p += exp_len;
}
exit:
Expand Down