analyse: correct the argc offset test

This commit is contained in:
Danny Robson 2020-12-29 08:01:53 +10:00
parent c172ee2c40
commit f083ff0f64

View File

@ -174,13 +174,13 @@ int main (int argc, char const **argv)
} }
emory::chunk::params p = emory::chunk::DEFAULT_PARAMS; emory::chunk::params p = emory::chunk::DEFAULT_PARAMS;
if (argc > ARG_BITS + 1) if (argc > ARG_BITS)
p.bits = cruft::parse::from_string<std::size_t> (argv[ARG_BITS]); p.bits = cruft::parse::from_string<std::size_t> (argv[ARG_BITS]);
if (argc > ARG_WINDOW + 1) if (argc > ARG_WINDOW)
p.window = cruft::parse::from_string<std::size_t> (argv[ARG_WINDOW]); p.window = cruft::parse::from_string<std::size_t> (argv[ARG_WINDOW]);
if (argc > ARG_BITS + 1) if (argc > ARG_MINIMUM)
p.minimum = cruft::parse::from_string<std::size_t> (argv[ARG_MINIMUM]); p.minimum = cruft::parse::from_string<std::size_t> (argv[ARG_MINIMUM]);
if (argc > ARG_MAXIMUM + 1) if (argc > ARG_MAXIMUM)
p.maximum = cruft::parse::from_string<std::size_t> (argv[ARG_MAXIMUM]); p.maximum = cruft::parse::from_string<std::size_t> (argv[ARG_MAXIMUM]);
std::cerr << p << '\n'; std::cerr << p << '\n';