* 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

@@ -174,7 +174,7 @@ namespace imc
// check consistency of blocks
void check_consistency()
{
for ( unsigned long int b = 0; b < this->rawblocks_.size()-1; b++ )
for ( unsigned long int b = 0; b < this->rawblocks_.size()-1 && this->rawblocks_.size() > 0; b++ )
{
if ( this->rawblocks_[b].get_end() >= this->rawblocks_[b+1].get_begin() )
{