We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 658d6b8 commit b17fb48Copy full SHA for b17fb48
lib/compress/zstd_lazy.c
@@ -122,7 +122,7 @@ static void ZSTD_insertDUBT1(ZSTD_CCtx* zc,
122
if ( (!extDict)
123
|| (matchIndex+matchLength >= dictLimit) /* both in current segment*/
124
|| (current < dictLimit) /* both in extDict */) {
125
- const BYTE* const mBase = !extDict || (matchIndex >= dictLimit) ? base : dictBase;
+ const BYTE* const mBase = !extDict || ((matchIndex+matchLength) >= dictLimit) ? base : dictBase;
126
assert( (matchIndex+matchLength >= dictLimit) /* might be wrong if extDict is incorrectly set to 0 */
127
|| (current < dictLimit) );
128
match = mBase + matchIndex;
0 commit comments