From fd8f99609af185d6be69ab654960efd852f43e5e Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Mon, 5 Aug 2013 10:07:40 +0000 Subject: Allow -m,10000 variant --- src/htscoremain.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/htscoremain.c b/src/htscoremain.c index 90f89e8..844c97f 100644 --- a/src/htscoremain.c +++ b/src/htscoremain.c @@ -1215,10 +1215,13 @@ HTSEXT_API int hts_main2(int argc, char **argv, httrackp * opt) { com++; break; case 'm': - sscanf(com + 1, LLintP, &opt->maxfile_nonhtml); - while(isdigit((unsigned char) *(com + 1))) - com++; - if (*(com + 1) == ',') { + // -m,10000 variant + if (*(com + 1) != ',') { + sscanf(com + 1, LLintP, &opt->maxfile_nonhtml); + while(isdigit((unsigned char) *(com + 1))) + com++; + } + if (*(com + 1) == ',' && isdigit((unsigned char) *(com + 2))) { com++; sscanf(com + 1, LLintP, &opt->maxfile_html); while(isdigit((unsigned char) *(com + 1))) -- cgit v1.2.3