diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:40:27 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 16:40:27 -0400 |
| commit | c1b054d03f5b31c33eaa0b267c629b118eaf3790 (patch) | |
| tree | 9333907ca767be24fcb3667877242976c3e3c8dd /lib/inflate.c | |
| parent | 559fb51ba7e66fe298b8355fabde1275b7def35f (diff) | |
| parent | bf4e70e54cf31dcca48d279c7f7e71328eebe749 (diff) | |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'lib/inflate.c')
| -rw-r--r-- | lib/inflate.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/inflate.c b/lib/inflate.c index 75e7d303c72e..6db6e98d1637 100644 --- a/lib/inflate.c +++ b/lib/inflate.c @@ -326,7 +326,7 @@ DEBG("huft1 "); { *t = (struct huft *)NULL; *m = 0; - return 0; + return 2; } DEBG("huft2 "); @@ -374,6 +374,7 @@ DEBG("huft5 "); if ((j = *p++) != 0) v[x[j]++] = i; } while (++i < n); + n = x[g]; /* set n to length of v */ DEBG("h6 "); @@ -410,12 +411,13 @@ DEBG1("1 "); DEBG1("2 "); f -= a + 1; /* deduct codes from patterns left */ xp = c + k; - while (++j < z) /* try smaller tables up to z bits */ - { - if ((f <<= 1) <= *++xp) - break; /* enough codes to use up j bits */ - f -= *xp; /* else deduct codes from patterns */ - } + if (j < z) + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ + } } DEBG1("3 "); z = 1 << j; /* table entries for j-bit table */ |
