Fix typo in limit test in deflate_buildhuf(). (The only two limit
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 7 Dec 2006 18:07:45 +0000 (18:07 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 7 Dec 2006 18:07:45 +0000 (18:07 +0000)
values ever used are 15 and 7, so testing against 16 is silly.)

git-svn-id: svn://svn.tartarus.org/sgt/halibut@6969 cda61777-01e9-0310-a592-d414129be87e

deflate.c

index 33c70cc..685097b 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -912,7 +912,8 @@ static void deflate_buildhuf(int *freqs, unsigned char *lengths,
      * assert()-level confident that the resulting code lengths
      * contain nothing outside the permitted range.
      */
-    maxprob = (limit == 16 ? 2584 : 55);   /* no point in computing full F_n */
+    assert(limit == 15 || limit == 7);
+    maxprob = (limit == 15 ? 2584 : 55);   /* no point in computing full F_n */
     totalfreq = nactivesyms = 0;
     smallestfreq = -1;
     for (i = 0; i < nsyms; i++) {