mirror of
https://github.com/chylex/Brotli-Builder.git
synced 2025-04-07 00:15:50 +02:00
Ensure empty command length code lists don't throw an exception
This commit is contained in:
parent
fb70490404
commit
c229d678d6
@ -275,6 +275,12 @@ namespace BrotliLib.Brotli.Encode.Build{
|
||||
}
|
||||
}
|
||||
|
||||
foreach(var icLengthCodeList in icLengthCodeFreq){
|
||||
if (icLengthCodeList.Count == 0){
|
||||
icLengthCodeList.Add(new InsertCopyLengthCode(0));
|
||||
}
|
||||
}
|
||||
|
||||
foreach(var distanceCodeList in distanceCodeFreq){
|
||||
if (distanceCodeList.Count == 0){
|
||||
distanceCodeList.Add(DistanceCode.Zero);
|
||||
|
Loading…
Reference in New Issue
Block a user