Ticket #9749: bzip2.patch

File bzip2.patch, 894 bytes (added by jtwang@…, 7 years ago)
  • bzip2.hpp

    old new  
    350350    ( const char*& src_begin, const char* src_end,
    351351      char*& dest_begin, char* dest_end, bool flush )
    352352{
     353         int result;
     354    do {
    353355    if (eof_) {
    354356        // reset the stream if there are more characters
    355357        if(src_begin == src_end)
     
    360362    if (!ready())
    361363        init();
    362364    before(src_begin, src_end, dest_begin, dest_end);
    363     int result = decompress();
     365        result = decompress();
    364366    if(result == bzip2::ok && flush)
    365367        result = check_end(src_begin, dest_begin);
    366368    after(src_begin, dest_begin);
    367369    bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
    368370    eof_ = result == bzip2::stream_end;
     371         } while (result == bzip2::stream_end && src_begin != src_end);
    369372    return true;
    370373}
    371374