diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-10-14 07:47:23 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-10-14 07:47:23 (GMT) |
commit | 199c9a6f4bf6ff6fe04c4c4ca17c24bc258079f7 (patch) | |
tree | d027c2391703e43bd78ffd33cb9a5f527fc525ea /Objects/longobject.c | |
parent | 8c737d280b52906cbb09fc53b70a7ff2098621be (diff) | |
download | cpython-199c9a6f4bf6ff6fe04c4c4ca17c24bc258079f7.zip cpython-199c9a6f4bf6ff6fe04c4c4ca17c24bc258079f7.tar.gz cpython-199c9a6f4bf6ff6fe04c4c4ca17c24bc258079f7.tar.bz2 |
Fix long_format_binary()
Issue #25399: Fix long_format_binary(), allocate bytes for the bytes writer.
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 00f5d95..759116a 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -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; |