chore: Fix dictionaryRandomAccess's issue for small file

When size of the given file is less than 1024 (DICTIONARY_BYTES), dict[] may contain garbage.
Therefore, test_decompress() fails with garbage dictionary.

This change set fixes the failure of test for dictionaryRandomAccess with TESTFILE_SMALL.
This commit is contained in:
t-mat
2024-11-18 16:43:13 +09:00
parent 184ffbd686
commit 855a097886

View File

@@ -251,7 +251,7 @@ int main(int argc, char* argv[])
FILE* outFp = fopen(decFilename, "wb");
printf("decompress : %s -> %s\n", lz4Filename, decFilename);
test_decompress(outFp, inpFp, dict, DICTIONARY_BYTES, offset, length);
test_decompress(outFp, inpFp, dict, dictSize, offset, length);
printf("decompress : done\n");
fclose(outFp);