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