Index: crc.hpp =================================================================== --- crc.hpp (revision 53002) +++ crc.hpp (working copy) @@ -947,6 +947,7 @@ void const * bytes_end ) { + value_type r = rem_; // Recompute the CRC for each byte passed for ( unsigned char const * p = static_cast(bytes_begin) ; p < bytes_end ; ++p ) @@ -955,10 +956,12 @@ // get the new bits, shift out the remainder's current higher // bits, and update the remainder with the polynominal division // of the new bits. - unsigned char const byte_index = helper_type::index( rem_, *p ); - rem_ = helper_type::shift( rem_ ); - rem_ ^= crc_table_type::table_[ byte_index ]; + unsigned char const byte_index = helper_type::index( r, *p ); + r = helper_type::shift( r ); + r ^= crc_table_type::table_[ byte_index ]; } + + rem_ = r; } template < std::size_t Bits, BOOST_CRC_PARM_TYPE TruncPoly,