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:
parent
c9ac1ad4c8
commit
04e99d4953
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ class Reader {
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool readValue(T& value) {
|
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>
|
template<std::size_t S>
|
||||||
|
|
Loading…
Reference in a new issue