mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Fix long_format_binary()
Issue #25399: Fix long_format_binary(), allocate bytes for the bytes writer.
This commit is contained in:
parent
8c737d280b
commit
199c9a6f4b
1 changed files with 1 additions and 1 deletions
|
|
@ -1836,7 +1836,7 @@ long_format_binary(PyObject *aa, int base, int alternate,
|
|||
kind = writer->kind;
|
||||
v = NULL;
|
||||
}
|
||||
else if (writer) {
|
||||
else if (bytes_writer) {
|
||||
*bytes_str = _PyBytesWriter_Prepare(bytes_writer, *bytes_str, sz);
|
||||
if (*bytes_str == NULL)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue