handle file eof when readBin

This commit is contained in:
Fire Cube 2025-05-03 21:50:44 +02:00
parent bcc65e7dd9
commit 6c8a792176

View File

@ -14,5 +14,9 @@ void writeBin(std::ostream& os, const T& v) {
template <typename T>
void readBin(std::istream& is, T& v) {
if (is.eof()) {
LOG_WARNING(Render_Recompiler, "BinaryHelper: EOF");
}
LOG_WARNING
is.read(reinterpret_cast<char*>(&v), sizeof(T));
}