Skip to content

fread return value ignored #57

@mathstuf

Description

@mathstuf

In include/diy/storage.hpp, fread is used, but its return value is ignored.

virtual inline void load_binary(char* x, size_t count)          { fread(x, 1, count, file); }

fread returns the number of items read, so when requesting 1000 bytes, a read may read just 10 and further calls are necessary.

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