Commit 81af5b01 authored by Chad Barb's avatar Chad Barb

Return an error if a negative weight is passed to -1, -2, or -3.

Also, interpret negative values of minrounds as zero.
Also, interpret any negative value for maxrounds as -1.
parent 29b9e038
......@@ -637,6 +637,16 @@ int main( int argc, char ** argv )
}
}
if (minrounds < 0 ) { minrounds = 0; }
if (maxrounds < 0 ) { maxrounds = -1; }
if (d1weight < 0.0f || d2weight < 0.0f || d3weight < 0.0f /* || plexPenalty < 0.0f */) {
fprintf(stderr,
"The '-1','-2' and '-3' switches each require\n"
"a positive argument, or zero.\n"
"Negative weights are silly.\n" );
exit(1);
}
char line[4096];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment