fix: Build on MSVC, properly handle empty files

This commit is contained in:
WerWolv
2025-12-30 10:30:14 +01:00
parent 73a17308cc
commit 54d9f8ec5c
2 changed files with 2 additions and 1 deletions

View File

@@ -281,6 +281,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);