mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-25 03:25:17 +00:00
handle file eof when readBin
This commit is contained in:
parent
bcc65e7dd9
commit
6c8a792176
@ -13,6 +13,10 @@ void writeBin(std::ostream& os, const T& v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void readBin(std::istream& is, T& v) {
|
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));
|
is.read(reinterpret_cast<char*>(&v), sizeof(T));
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user