mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-25 19:44:57 +00:00
handle file eof when readBin
This commit is contained in:
parent
bcc65e7dd9
commit
6c8a792176
@ -14,5 +14,9 @@ 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