Skip to content

Output() writes to ofstream before open() #5

Description

@Maccchiatooo

src/lbm.cpp:544 applies a manipulator to outfile before outfile.open() on line 545. Writing to an unopened ofstream sets failbit; this only works because open() calls clear() on success and setiosflags bypasses the sentry. Move the open() above the manipulator.

Low urgency: Output() has no callers today (MPIoutput is commented out at main.cpp:83). Found while adding the CPU/CMake build.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions