1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-29 11:21:22 +03:00

Add unit tests to seekable

This commit is contained in:
senhuang42
2020-12-02 15:27:39 -05:00
parent 9db49a3989
commit 152b55879c
4 changed files with 106 additions and 2 deletions

View File

@ -420,8 +420,10 @@ size_t ZSTD_seekable_decompress(ZSTD_seekable* zs, void* dst, size_t len, unsign
outTmp.pos - prevOutPos);
}
forwardProgress = outTmp.pos - prevOutPos;
if (!forwardProgress && noOutputProgressCount++ > ZSTD_SEEKABLE_NO_OUTPUT_PROGRESS_MAX) {
return ERROR(seekableIO);
if (forwardProgress == 0) {
if (noOutputProgressCount++ > ZSTD_SEEKABLE_NO_OUTPUT_PROGRESS_MAX) {
return ERROR(seekableIO);
}
} else {
noOutputProgressCount = 0;
}