* py_imc_termite.pyx: remove json loads parse_float option

* imc_raw.hpp: catch empty/invalid file to avoid seg fault
This commit is contained in:
2021-05-02 19:34:08 +02:00
parent 16a77ecf1e
commit e7094d0125
3 changed files with 10 additions and 3 deletions

View File

@@ -178,6 +178,13 @@ int main(int argc, char* argv[])
return 1;
}
// catch invalid or empty ".raw" file
if ( imcraw.blocks().size() == 0 )
{
std::cerr<<"this appears to be an empty/invalid '.raw' file since no blocks were found"<<"\n";
return 1;
}
// list blocks
if ( cfgopts.count("listblocks") == 1 )
{