Fix long_format_binary()

Issue #25399: Fix long_format_binary(), allocate bytes for the bytes writer.
This commit is contained in:
Victor Stinner 2015-10-14 09:47:23 +02:00
parent 8c737d280b
commit 199c9a6f4b
1 changed files with 1 additions and 1 deletions

View File

@ -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;