Merge pull request #1547 from shakeelrao/fix-error

Fix incorrect error code in ZSTD_errorFrameSizeInfo
This commit is contained in:
Nick Terrell authored and GitHub committed 2019-03-15 10:57:49 -07:00
commit f52a7d8faa
3 files changed
+26 -6

No files matched your search

+2 -2
View File
@@ -437,7 +437,7 @@ static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t he
* Contains the compressed frame size and an upper-bound for the decompressed frame size.
* Note: before using `compressedSize` you must check for errors using ZSTD_isError().
* similarly, before using `decompressedBound`, you must check for errors using:
* `decompressedBound` != ZSTD_CONTENTSIZE_UNKNOWN
* `decompressedBound` != ZSTD_CONTENTSIZE_ERROR
*/
typedef struct {
size_t compressedSize;
@@ -448,7 +448,7 @@ static ZSTD_frameSizeInfo ZSTD_errorFrameSizeInfo(size_t ret)
{
ZSTD_frameSizeInfo frameSizeInfo;
frameSizeInfo.compressedSize = ret;
frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_UNKNOWN;
frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_ERROR;
return frameSizeInfo;
}