diff options
| -rw-r--r-- | bzip2recover.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bzip2recover.c b/bzip2recover.c index 26a9b9d..28d4a05 100644 --- a/bzip2recover.c +++ b/bzip2recover.c | |||
| @@ -441,7 +441,12 @@ Int32 main ( Int32 argc, Char** argv ) | |||
| 441 | wrBlock = 0; | 441 | wrBlock = 0; |
| 442 | while (True) { | 442 | while (True) { |
| 443 | b = bsGetBit(bsIn); | 443 | b = bsGetBit(bsIn); |
| 444 | if (b == 2) break; | 444 | if (b == 2) { |
| 445 | if (outFile != NULL) { | ||
| 446 | bsClose(bsWr); | ||
| 447 | } | ||
| 448 | break; | ||
| 449 | } | ||
| 445 | buffHi = (buffHi << 1) | (buffLo >> 31); | 450 | buffHi = (buffHi << 1) | (buffLo >> 31); |
| 446 | buffLo = (buffLo << 1) | (b & 1); | 451 | buffLo = (buffLo << 1) | (b & 1); |
| 447 | if (bitsRead == 47+rbStart[wrBlock]) | 452 | if (bitsRead == 47+rbStart[wrBlock]) |
