1
0
mirror of synced 2025-01-18 17:14:13 +01:00

fix: Searching not working at all

This commit is contained in:
WerWolv 2022-03-03 09:06:10 +01:00
parent cc59b36c54
commit 2300b0c692

View File

@ -503,7 +503,7 @@ namespace hex::plugin::builtin {
std::vector<u8> buffer(1024, 0x00);
size_t dataSize = provider->getSize();
for (u64 offset = 0; offset < dataSize; offset += 1024) {
size_t usedBufferSize = std::min<size_t>({ buffer.size(), dataSize - offset, string.size() });
size_t usedBufferSize = std::min<size_t>(buffer.size(), dataSize - offset);
provider->read(offset + provider->getBaseAddress() + provider->getCurrentPageAddress(), buffer.data(), usedBufferSize);
for (u64 i = 0; i < usedBufferSize; i++) {
@ -544,7 +544,7 @@ namespace hex::plugin::builtin {
std::vector<u8> buffer(1024, 0x00);
size_t dataSize = provider->getSize();
for (u64 offset = 0; offset < dataSize; offset += 1024) {
size_t usedBufferSize = std::min<size_t>({ buffer.size(), dataSize - offset, hex.size() });
size_t usedBufferSize = std::min<size_t>(buffer.size(), dataSize - offset);
provider->read(offset + provider->getBaseAddress() + provider->getCurrentPageAddress(), buffer.data(), usedBufferSize);
for (u64 i = 0; i < usedBufferSize; i++) {