Ticket #3030: my.patch

File my.patch, 1003 bytes (added by qehgt0@…, 13 years ago)

patch file for crc.hpp

  • crc.hpp

     
    947947    void const *  bytes_end
    948948)
    949949{
     950    value_type r = rem_;
    950951    // Recompute the CRC for each byte passed
    951952    for ( unsigned char const * p
    952953     = static_cast<unsigned char const *>(bytes_begin) ; p < bytes_end ; ++p )
     
    955956        // get the new bits, shift out the remainder's current higher
    956957        // bits, and update the remainder with the polynominal division
    957958        // of the new bits.
    958         unsigned char const  byte_index = helper_type::index( rem_, *p );
    959         rem_ = helper_type::shift( rem_ );
    960         rem_ ^= crc_table_type::table_[ byte_index ];
     959        unsigned char const  byte_index = helper_type::index( r, *p );
     960        r = helper_type::shift( r );
     961        r ^= crc_table_type::table_[ byte_index ];
    961962    }
     963
     964    rem_ = r;
    962965}
    963966
    964967template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly,