From dbeaeb217c3d080c18f95e59512a9a0855ed3d2b Mon Sep 17 00:00:00 2001 From: Edward Vigmond <edward.vigmond@u-bordeaux.fr> Date: Mon, 19 Oct 2020 11:42:06 +0200 Subject: [PATCH] Work with IGB files>2 GB (int limit) --- src/IGBheader.cc | 2 +- src/IGBheader.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IGBheader.cc b/src/IGBheader.cc index 63150d4..bedba22 100644 --- a/src/IGBheader.cc +++ b/src/IGBheader.cc @@ -1383,7 +1383,7 @@ int IGBheader::endian() /** set the data pointer to a specific frame */ -bool IGBheader::data_frame( int frame ) { +bool IGBheader::data_frame( size_t fr ) { if( frame >= v_t ) return false; diff --git a/src/IGBheader.h b/src/IGBheader.h index 2c03aa5..6cf5556 100644 --- a/src/IGBheader.h +++ b/src/IGBheader.h @@ -353,7 +353,7 @@ class IGBheader inline char* transparentstr(void){ return transstr; } int num_components(){ return Num_Components[v_type]; } int endian(); - bool data_frame( int ); + bool data_frame( size_t ); template<class T> int read_data( T* dp, int numt=1, char *buf=NULL ); template<class T> void write_data( T* dp, int numt=1, char *buf=NULL ); template<class T> void to_bin( void *buf, T d ); @@ -405,7 +405,7 @@ template<class T> int IGBheader::read_data( T* dp, int numt, char *buf ) { - int slicesize = data_size()*slice_sz()*numt; + size_t slicesize = data_size()*slice_sz()*numt; bool alloc_buf = false; if ( buf==NULL ) { buf = new char[slicesize]; -- GitLab