mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Build on MSVC, properly handle empty files
(cherry picked from commit 54d9f8ec5c)
This commit is contained in:
@@ -276,6 +276,7 @@ namespace hex::plugin::builtin {
|
||||
m_data.resize(startSize + ChunkSize);
|
||||
auto result = m_file.readBuffer(m_data.data() + startSize, ChunkSize);
|
||||
if (result <= 0) {
|
||||
m_data.resize(startSize);
|
||||
break;
|
||||
} else if (result < ChunkSize) {
|
||||
m_data.resize(startSize + result);
|
||||
|
||||
Reference in New Issue
Block a user