Update brotlimodule.cc

This commit is contained in:
Eugene Kliuchnikov 2016-09-21 15:51:54 +02:00 committed by GitHub
parent de1007f05a
commit 7cbdb4aa0c

View File

@ -232,9 +232,8 @@ static PyObject* brotli_decompress(PyObject *self, PyObject *args, PyObject *key
while (result == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT) {
size_t available_out = kBufferSize;
uint8_t* next_out = buffer;
result = BrotliDecoderDecompressStream(&length, &input,
&available_out, &next_out,
0, state);
result = BrotliDecoderDecompressStream(state, &length, &input,
&available_out, &next_out, 0);
size_t used_out = kBufferSize - available_out;
if (used_out != 0)
output.insert(output.end(), buffer, buffer + used_out);