Skip to content

Unable to read from file a zero DA object #54

@mmassari1974

Description

@mmassari1974

When saving a zero DA object to file the string " ALL COEFFICIENTS ZERO" is shorter than 36 characters. This causes a wrong behaviour of ifstram >> operator which consumes the terminator line of the DA object as part of the coefficients line. In this way, the terminator line is searched in the following empty line, which causes an out_of_range exception in the compare method of std::string. The easy fix would be to pad with spaces up to 36 character the string " ALL COEFFICIENTS ZERO" in daceio.c. This will solve the problem for newly created file, but not for older ones.

A workaround to load the old file is to add the spaces (up to 36 character) to all the line " ALL COEFFICIENTS ZERO" in the output file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions