diff --git a/fb2k/foostream.cpp b/fb2k/foostream.cpp index 79855297..97312096 100644 --- a/fb2k/foostream.cpp +++ b/fb2k/foostream.cpp @@ -49,13 +49,14 @@ static size_t read_the_rest_foo(uint8_t * dest, off_t offset, size_t length, FOO streamfile->validsize=0; try { - if(offset >= streamfile->m_file->get_size(*streamfile->p_abort)) { + if(offset > streamfile->m_file->get_size(*streamfile->p_abort)) { /* Update offset at end of file */ streamfile->offset = streamfile->m_file->get_size(*streamfile->p_abort); return length_read; } streamfile->m_file->seek(offset,*streamfile->p_abort); - if (streamfile->m_file->is_eof(*streamfile->p_abort)) return length_read; + //if (streamfile->m_file->is_eof(*streamfile->p_abort)) /* allow edge case of offset=filesize */ + // return length_read; } catch (...) { streamfile->offset = streamfile->m_file->get_size(*streamfile->p_abort); #ifdef PROFILE_STREAMFILE