BinaryIo: fix Reader::readValue().

std::fread() returns how many things it read, not the amount of
bytes read. Worst thing is, I got this right everywhere else.
This commit is contained in:
Guillaume Jacquemin 2024-03-25 12:02:12 +01:00
parent c9ac1ad4c8
commit 04e99d4953
Signed by: williamjcm
SSH Key Fingerprint: SHA256:AYLOg+iTV0ElElnlu4vqM4edFazVdRiuQB0Y5LoKc4A
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class Reader {
template<typename T>
bool readValue(T& value) {
return fread(&value, sizeof(T), 1, _file) == sizeof(T);
return fread(&value, sizeof(T), 1, _file) == 1;
}
template<std::size_t S>