mirror of https://github.com/python/cpython
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
|
@ -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…
Reference in New Issue