Skip to content
Snippets Groups Projects
Commit ad50015a authored by Veronique Legrand's avatar Veronique Legrand
Browse files

fixed bug related to output value of lseek that happened only on very large files

parent 8edc1fc9
No related branches found
No related tags found
No related merge requests found
Pipeline #149806 passed with stage
in 20 minutes and 14 seconds
......@@ -19,7 +19,7 @@
#include "FqBaseBackend.h"
//#define DEBUG
#define DEBUG
#ifdef DEBUG
#include <cassert>
#include <iostream>
......@@ -157,8 +157,8 @@ int FqBaseBackend::getRead(const unsigned long& offset, char * fq_record) {
#ifdef DEBUG
cout<<"going to read record at offset: "<<offset<<endl;
#endif
int res=lseek(i_f_desc,offset,SEEK_SET);
if (res==-1) {
off_t res=lseek(i_f_desc,offset,SEEK_SET);
if (res==(off_t)-1) {
#ifdef DEBUG
cout<<"Couldn't get read at offset: "<<offset<<endl;
#endif
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment