mirror of
https://github.com/google/brotli.git
synced 2024-11-09 21:50:07 +00:00
Fix issue #383
This commit is contained in:
parent
2c16351987
commit
27f9d00efc
@ -174,7 +174,7 @@ static PyObject* brotli_compress(PyObject *self, PyObject *args, PyObject *keywd
|
||||
end:
|
||||
BrotliEncoderDestroyInstance(enc);
|
||||
if (ok) {
|
||||
ret = PyBytes_FromStringAndSize((char*)output, output_length);
|
||||
ret = PyBytes_FromStringAndSize((char*)output, output_length - available_out);
|
||||
} else {
|
||||
PyErr_SetString(BrotliError, "BrotliCompressBuffer failed");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user