diff options
Diffstat (limited to 'usr.bin/compress/zopen.c')
-rw-r--r-- | usr.bin/compress/zopen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/compress/zopen.c b/usr.bin/compress/zopen.c index 9790f24..510b895 100644 --- a/usr.bin/compress/zopen.c +++ b/usr.bin/compress/zopen.c @@ -254,7 +254,7 @@ zwrite(cookie, wbp, num) goto middle; state = S_MIDDLE; - maxmaxcode = 1L << BITS; + maxmaxcode = 1L << maxbits; if (fwrite(magic_header, sizeof(char), sizeof(magic_header), fp) != sizeof(magic_header)) return (-1); @@ -707,7 +707,7 @@ zopen(fname, mode, bits) return (NULL); maxbits = bits ? bits : BITS; /* User settable max # bits/code. */ - maxmaxcode = 1 << BITS; /* Should NEVER generate this code. */ + maxmaxcode = 1L << maxbits; /* Should NEVER generate this code. */ hsize = HSIZE; /* For dynamic table sizing. */ free_ent = 0; /* First unused entry. */ block_compress = BLOCK_MASK; |