Issue #16828: Fix error incorrectly raised by bz2.compress('').

Patch by Martin Packman.
This commit is contained in:
Nadeem Vawda 2013-01-02 23:02:00 +01:00
parent d581fff6f0
commit 638fb9bbed
4 changed files with 20 additions and 1 deletions

View file

@ -1979,7 +1979,7 @@ bz2_compress(PyObject *self, PyObject *args, PyObject *kwargs)
return NULL;
}
action = BZ_RUN;
action = input_left > 0 ? BZ_RUN : BZ_FINISH;
for (;;) {
char *saved_next_out;