From ae5e00d83c338c93e5e7af3e032312317c41b765 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Thu, 11 Jan 2018 23:49:03 +0000 Subject: [PATCH] Restrict max blocksize to [1,2,3]. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8401 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/wsprd/wsprd_exp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/wsprd/wsprd_exp.c b/lib/wsprd/wsprd_exp.c index 3a7d3cbc1..6da51614d 100644 --- a/lib/wsprd/wsprd_exp.c +++ b/lib/wsprd/wsprd_exp.c @@ -694,7 +694,7 @@ void usage(void) printf("\n"); printf("Options:\n"); printf(" -a path to writeable data files, default=\".\"\n"); - printf(" -b x (sequence estimator block size; 1,2,3,6, or 9)\n"); + printf(" -b x (sequence estimator block size; 1,2,3)\n"); printf(" -c write .c2 file at the end of the first pass\n"); printf(" -C maximum number of decoder cycles per bit, default 10000\n"); printf(" -d deeper search. Slower, a few more decodes\n"); @@ -797,6 +797,10 @@ int main(int argc, char *argv[]) break; case 'b': nblocksize=(int) atoi(optarg); + if( nblocksize < 1 || nblocksize > 3 ) { + usage(); + return 1; + } break; case 'c': writec2=1;