Merge pull request #385 from google/eustas-patch-1

Fix issue #383
This commit is contained in:
eustas 2016-06-23 22:04:55 +02:00 committed by GitHub
commit 49df97c472

View File

@ -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");
}