diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-08-05 10:07:40 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-08-05 10:07:40 +0000 |
commit | fd8f99609af185d6be69ab654960efd852f43e5e (patch) | |
tree | 435c733679ce02fbd9cc31699daeadaa26d96758 /src | |
parent | 683668120e098a12762d1f2e4e03afda7eec5ad9 (diff) |
Allow -m,10000 variant
Diffstat (limited to 'src')
-rw-r--r-- | src/htscoremain.c | 11 |
1 files changed, 7 insertions, 4 deletions
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))) |