mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
Fix a segfault in the CLI tool
This commit is contained in:
parent
c9e97532ce
commit
080b2b2ef1
1 changed files with 7 additions and 7 deletions
|
|
@ -17,19 +17,19 @@ int main(int argc, char *argv[])
|
|||
|
||||
initLogger();
|
||||
|
||||
if (argc > 0)
|
||||
if (argc > 1)
|
||||
{
|
||||
if (strcmp(argv[1], "project") == 0)
|
||||
{
|
||||
initSatdump();
|
||||
return project(argc - 1, &argv[1]);
|
||||
}
|
||||
else if (argc < 6 || strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0)
|
||||
{
|
||||
logger->info("Usage : " + std::string(argv[0]) + " [downlink] [input_level] [input_file] [output_level] [output_file_or_directory] [additional options as required]");
|
||||
logger->info("Extra options : -samplerate [baseband_samplerate] -baseband_format [f32/i16/i8/w8] -dc_block -iq_swap");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else if (argc < 6 || strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0)
|
||||
{
|
||||
logger->info("Usage : " + std::string(argv[0]) + " [downlink] [input_level] [input_file] [output_level] [output_file_or_directory] [additional options as required]");
|
||||
logger->info("Extra options : -samplerate [baseband_samplerate] -baseband_format [f32/i16/i8/w8] -dc_block -iq_swap");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
initSatdump();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue