Merge pull request #226 from netgroup/master

improve parsing of stepbytes (increment size) argument
This commit is contained in:
David Addison
2024-07-30 14:58:54 -07:00
committed by GitHub
+6 -1
View File
@@ -770,7 +770,12 @@ int main(int argc, char* argv[]) {
maxBytes = (size_t)parsed;
break;
case 'i':
stepBytes = strtol(optarg, NULL, 0);
parsed = parsesize(optarg);
if (parsed < 0) {
fprintf(stderr, "invalid size specified for 'stepBytes'\n");
return -1;
}
stepBytes = (size_t)parsed;
break;
case 'f':
stepFactor = strtol(optarg, NULL, 0);