Skip to content

Commit

Permalink
Prevent invalid Zopfli iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Oct 10, 2023
1 parent 312eda4 commit ae0664f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public enum Strategy {

/** Construct the list of compressors for the given settings */
private static Compressor[] getCompressors(boolean java, boolean jzlib, boolean jzopfli, boolean cafeundzopfli, int iter, Strategy mode, int defaultSplit) {
if (iter < 1) {
iter = 1;
}

final List<Compressor> compressorsList = new ArrayList<>();

if (java) {
Expand Down

0 comments on commit ae0664f

Please sign in to comment.