diff options
author | ats <ats@FreeBSD.org> | 1995-01-02 10:04:02 +0000 |
---|---|---|
committer | ats <ats@FreeBSD.org> | 1995-01-02 10:04:02 +0000 |
commit | 1e1f81d37c95856f99694cf1942bd4f407d67f6f (patch) | |
tree | 23a311009a80f91cd88b904352e539a88c048849 /usr.bin | |
parent | 8e024c3b91f9ef7c068452b276e71f807b92b910 (diff) | |
download | FreeBSD-src-1e1f81d37c95856f99694cf1942bd4f407d67f6f.zip FreeBSD-src-1e1f81d37c95856f99694cf1942bd4f407d67f6f.tar.gz |
Correct the usage of the maxmaxcode so that compress -b 12 works again.
Thanks to Dave Rivers for reporting that problem.
Diffstat (limited to 'usr.bin')
-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; |