diff --git a/iguana/exchanges/LP_cache.c b/iguana/exchanges/LP_cache.c index 3a28cd241..bf4a909c3 100644 --- a/iguana/exchanges/LP_cache.c +++ b/iguana/exchanges/LP_cache.c @@ -133,6 +133,9 @@ void LP_cacheptrs_init(struct iguana_info *coin) fp = fopen(fname,"rb"); if ( fp != 0 ) { + fseek(fp,0,SEEK_END); + fsize = ftell(fp); + rewind(fp); while ( len < fsize ) { if ( (n= LP_cacheitem(coin,fp)) < 0 )