aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/memory.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-12-12 18:53:02 +0100
committerKarel Kočí <cynerd@email.cz>2017-12-12 18:53:02 +0100
commit15398c34d38489bf14a100bbf01fb9fb4c7e46cb (patch)
tree7121325d9ba6d1166b7faa4b8664bdcac875d995 /qtmips_machine/memory.cpp
parent36853877b262bd47417be1637a1854ae3145384e (diff)
downloadqtmips-15398c34d38489bf14a100bbf01fb9fb4c7e46cb.tar.gz
qtmips-15398c34d38489bf14a100bbf01fb9fb4c7e46cb.tar.bz2
qtmips-15398c34d38489bf14a100bbf01fb9fb4c7e46cb.zip
Implement branch and jump instructions
Diffstat (limited to 'qtmips_machine/memory.cpp')
-rw-r--r--qtmips_machine/memory.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qtmips_machine/memory.cpp b/qtmips_machine/memory.cpp
index ef4c7e2..282a9e9 100644
--- a/qtmips_machine/memory.cpp
+++ b/qtmips_machine/memory.cpp
@@ -240,8 +240,9 @@ union MemoryTree *Memory::copy_section_tree(const union MemoryTree *mt, size_t d
union MemoryTree *nmt = allocate_section_tree();
if (depth < (MEMORY_TREE_H - 1)) { // Following level is memory tree
for (int i = 0; i < MEMORY_TREE_LEN; i++) {
- if (mt[i].mt != nullptr)
+ if (mt[i].mt != nullptr) {
nmt[i].mt = copy_section_tree(mt[i].mt, depth + 1);
+ }
}
} else { // Following level is memory section
for (int i = 0; i < MEMORY_TREE_LEN; i++) {