From 2b9e43db820d24ebca1e5f6bffad969d53bd05f8 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 29 Jul 2022 21:44:00 +0200 Subject: [PATCH] fix: Crash when using BufferedReader ReverseIterator --- lib/libimhex/include/hex/providers/buffered_reader.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libimhex/include/hex/providers/buffered_reader.hpp b/lib/libimhex/include/hex/providers/buffered_reader.hpp index 5b7241a54..9bc72546a 100644 --- a/lib/libimhex/include/hex/providers/buffered_reader.hpp +++ b/lib/libimhex/include/hex/providers/buffered_reader.hpp @@ -53,7 +53,7 @@ namespace hex::prv { this->updateBuffer(address - std::min(address, this->m_buffer.size()), size); - auto result = &this->m_buffer[address - this->m_startAddress]; + auto result = &this->m_buffer[address - this->m_bufferAddress]; return { result, result + std::min(size, this->m_buffer.size()) }; }