From 36853877b262bd47417be1637a1854ae3145384e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 12 Dec 2017 18:39:56 +0100 Subject: Don't create memory section on read_byte --- qtmips_machine/memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtmips_machine/memory.cpp b/qtmips_machine/memory.cpp index a9cc055..ef4c7e2 100644 --- a/qtmips_machine/memory.cpp +++ b/qtmips_machine/memory.cpp @@ -170,7 +170,7 @@ void Memory::write_byte(std::uint32_t address, std::uint8_t value) { } std::uint8_t Memory::read_byte(std::uint32_t address) const { - MemorySection *section = this->get_section(address, true); + MemorySection *section = this->get_section(address, false); if (section == nullptr) return 0; else -- cgit v1.2.3