1
0
mirror of synced 2025-01-19 01:24:15 +01:00

fix: Another file read issue

This commit is contained in:
WerWolv 2022-06-27 15:08:22 +02:00
parent 5800546369
commit a936cf1ce4
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit 24612218e4d4f085c82cbbbaa6a25a5a9bcc7ec7
Subproject commit eeac9a265b99ed91880126282f0c8d70e80c9de1

View File

@ -80,7 +80,7 @@ namespace hex::fs {
return "";
const char *cString = reinterpret_cast<const char *>(bytes.data());
return { cString, std::strlen(cString) };
return { cString, std::min(bytes.size(), std::strlen(cString)) };
}
void File::write(const u8 *buffer, size_t size) {