Skip to content

ifstream.tellg() returns -1 on error #516

Description

@paulmenzel

Currently, the code assumes, that ifstream.tellg() return non-negative values.

source/BAMbinSortByCoordinate.cpp:        uint s1=bamInStream.tellg();
source/Genome.cpp:        size=(uint) stream.tellg();
source/Genome_genomeGenerate.cpp://         nSAbyte=(uint) oldSAin.tellg();

Documentation:

Return Value

The current position in the stream.

If either the stream buffer associated to the stream does not support the operation, or if it fails, the function returns -1.

streampos is an fpos type (it can be converted to/from integral types).

[…]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions