summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:06:49 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:06:49 +0000
commit38911c04adbe853acb3d534e1853a8a0ffce88bd (patch)
tree77e6c7cdc56b911b917f20219c93423641d959a3 /main.c
parentAdding debian version 1.7~pre1-1. (diff)
downloadlzlib-38911c04adbe853acb3d534e1853a8a0ffce88bd.tar.xz
lzlib-38911c04adbe853acb3d534e1853a8a0ffce88bd.zip
Merging upstream version 1.7~rc1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/main.c b/main.c
index 1c9d29c..cab15b5 100644
--- a/main.c
+++ b/main.c
@@ -289,11 +289,15 @@ static unsigned long long getnum( const char * const ptr,
static int get_dict_size( const char * const arg )
{
char * tail;
- int bits = strtol( arg, &tail, 0 );
+ int dictionary_size;
+ const int bits = strtol( arg, &tail, 0 );
if( bits >= LZ_min_dictionary_bits() &&
bits <= LZ_max_dictionary_bits() && *tail == 0 )
return ( 1 << bits );
- return getnum( arg, LZ_min_dictionary_size(), LZ_max_dictionary_size() );
+ dictionary_size = getnum( arg, LZ_min_dictionary_size(),
+ LZ_max_dictionary_size() );
+ if( dictionary_size == 65535 ) ++dictionary_size;
+ return dictionary_size;
}
@@ -836,7 +840,7 @@ int main( const int argc, const char * const argv[] )
{ 3 << 23, 132 }, /* -8 */
{ 1 << 25, 273 } }; /* -9 */
struct Lzma_options encoder_options = option_mapping[6]; /* default = "-6" */
- const unsigned long long max_member_size = 0x0100000000000000ULL;
+ const unsigned long long max_member_size = 0x0008000000000000ULL;
const unsigned long long max_volume_size = 0x4000000000000000ULL;
unsigned long long member_size = max_member_size;
unsigned long long volume_size = 0;