ui: Moved hex editor settings to settings menu

This commit is contained in:
WerWolv
2021-09-20 23:40:36 +02:00
parent 46f196cb3f
commit fef072f721
14 changed files with 240 additions and 75 deletions

View File

@@ -45,7 +45,7 @@ namespace hex::prv {
void FileProvider::read(u64 offset, void *buffer, size_t size, bool overlays) {
if (((offset - this->getBaseAddress()) + size) > this->getSize() || buffer == nullptr || size == 0)
if ((offset - this->getBaseAddress()) > (this->getSize() - size) || buffer == nullptr || size == 0)
return;
std::memcpy(buffer, reinterpret_cast<u8*>(this->m_mappedFile) + PageSize * this->m_currPage + offset - this->getBaseAddress(), size);