This commit is contained in:
2025-11-28 17:48:27 +01:00
parent 6016f1fd8e
commit 6242a7565e
3 changed files with 7 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ void BinUtil::Read(T& v) {
// Read data into buffer
m_file.read(reinterpret_cast<char*>(buf.data()), sizeof(T));
// Loop or in be reverse loop and chift the values
for (int i = 0; i < sizeof(T); i++) {
for (size_t i = 0; i < sizeof(T); i++) {
v |= static_cast<T>(buf[m_big ? sizeof(T) - 1 - i : i]) << (8 * i);
}
}