fixed offset in this case os that it always goes past src start
This commit is contained in:
@@ -683,8 +683,8 @@ static U32 generateSequences(U32* seed, frame_t* frame, seqStore_t* seqStore,
|
|||||||
1;
|
1;
|
||||||
if (info.useDict && (RAND(seed) & 1)) {
|
if (info.useDict && (RAND(seed) & 1)) {
|
||||||
/* need to occasionally generate offsets that go past the start */
|
/* need to occasionally generate offsets that go past the start */
|
||||||
U32 const lenPastStart = RAND(seed) % info.dictContentSize;
|
U32 const lenPastStart = RAND(seed) % info.dictContentSize + 1;
|
||||||
offset = offset+lenPastStart;
|
offset = ((BYTE*)srcPtr - (BYTE*)frame->srcStart)+lenPastStart;
|
||||||
}
|
}
|
||||||
offsetCode = offset + ZSTD_REP_MOVE;
|
offsetCode = offset + ZSTD_REP_MOVE;
|
||||||
repIndex = 2;
|
repIndex = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user