return >0 only when really finished

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4861 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-01-23 16:03:10 +00:00
parent 0d152aa1de
commit 9cb54c2272

View file

@ -40,9 +40,13 @@ class CBzip2 : public ICompressor {
int Compress(bool finish) {
// act like zlib when it comes to stream ending
if (last_ret == BZ_STREAM_END && finish)
return BZ_STREAM_END;
return C_FINISHED;
last_ret = BZ2_bzCompress(stream, finish?BZ_FINISH:0);
return last_ret;
if (last_ret < 0)
return last_ret;
return C_OK;
}
void SetNextIn(char *in, unsigned int size) {