diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-01-02 22:02:00 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-01-02 22:02:00 (GMT) |
commit | 638fb9bbedd84975512554194a5a22b9e2c0637c (patch) | |
tree | e7bd8731cf16401f9042c945a8d5fed6bb78a9b4 /Modules | |
parent | d581fff6f009812ff399b387a775218e0ddaaac3 (diff) | |
download | cpython-638fb9bbedd84975512554194a5a22b9e2c0637c.zip cpython-638fb9bbedd84975512554194a5a22b9e2c0637c.tar.gz cpython-638fb9bbedd84975512554194a5a22b9e2c0637c.tar.bz2 |
Issue #16828: Fix error incorrectly raised by bz2.compress('').
Patch by Martin Packman.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/bz2module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/bz2module.c b/Modules/bz2module.c index 4795965..2e99df9 100644 --- a/Modules/bz2module.c +++ b/Modules/bz2module.c @@ -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; |