when dumping stream, preserve the subset of bits in the last word

that's real data. This fixes assertions that after popping a move off
the move stack the hash is the same as before it was pushed. It may or
may not be sufficient to fix reported stalls, but it's certainly
necessary.
This commit is contained in:
Eric House 2015-12-30 05:56:01 -08:00
parent 6ce1fbe465
commit 89138edae1

View file

@ -195,7 +195,7 @@ mem_stream_copyBits( const XWStreamCtxt* p_sctx, XWStreamPos XP_UNUSED(startPos)
XP_ASSERT( len <= stream->nBytesAllocated );
XP_MEMCPY( buf, stream->buf, len );
if ( 0 != BIT_PART(endPos) ) {
buf[len-1] &= 1 << BIT_PART(endPos);
buf[len-1] &= ~(0xFF << BIT_PART(endPos));
}
}
*lenp = len;