aboutsummaryrefslogtreecommitdiff
path: root/C/ZstdDec.c
diff options
context:
space:
mode:
Diffstat (limited to 'C/ZstdDec.c')
-rw-r--r--C/ZstdDec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/C/ZstdDec.c b/C/ZstdDec.c
index ac159d6..6ad47eb 100644
--- a/C/ZstdDec.c
+++ b/C/ZstdDec.c
@@ -1,5 +1,5 @@
1/* ZstdDec.c -- Zstd Decoder 1/* ZstdDec.c -- Zstd Decoder
22024-05-26 : the code was developed by Igor Pavlov, using Zstandard format 22024-06-18 : the code was developed by Igor Pavlov, using Zstandard format
3 specification and original zstd decoder code as reference code. 3 specification and original zstd decoder code as reference code.
4original zstd decoder code: Copyright (c) Facebook, Inc. All rights reserved. 4original zstd decoder code: Copyright (c) Facebook, Inc. All rights reserved.
5This source code is licensed under BSD 3-Clause License. 5This source code is licensed under BSD 3-Clause License.
@@ -1308,8 +1308,10 @@ FSE_Decode_SeqTable(CFseRecord * const table,
1308 in->len--; 1308 in->len--;
1309 { 1309 {
1310 const Byte *ptr = in->ptr; 1310 const Byte *ptr = in->ptr;
1311 const Byte sym = ptr[0]; 1311 const unsigned sym = ptr[0];
1312 in->ptr = ptr + 1; 1312 in->ptr = ptr + 1;
1313 if (sym >= numSymbolsMax)
1314 return SZ_ERROR_DATA;
1313 table[0] = (FastInt32)sym 1315 table[0] = (FastInt32)sym
1314 #if defined(Z7_ZSTD_DEC_USE_ML_PLUS3) 1316 #if defined(Z7_ZSTD_DEC_USE_ML_PLUS3)
1315 + (numSymbolsMax == NUM_ML_SYMBOLS ? MATCH_LEN_MIN : 0) 1317 + (numSymbolsMax == NUM_ML_SYMBOLS ? MATCH_LEN_MIN : 0)