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:
parent
0d152aa1de
commit
9cb54c2272
1 changed files with 6 additions and 2 deletions
|
@ -40,9 +40,13 @@ class CBzip2 : public ICompressor {
|
||||||
int Compress(bool finish) {
|
int Compress(bool finish) {
|
||||||
// act like zlib when it comes to stream ending
|
// act like zlib when it comes to stream ending
|
||||||
if (last_ret == BZ_STREAM_END && finish)
|
if (last_ret == BZ_STREAM_END && finish)
|
||||||
return BZ_STREAM_END;
|
return C_FINISHED;
|
||||||
last_ret = BZ2_bzCompress(stream, finish?BZ_FINISH:0);
|
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) {
|
void SetNextIn(char *in, unsigned int size) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue