Skip to content

Commit 3356e78

Browse files
committed
Fix a bug with clearing the cache in writeBranch
ptr contains the actual address modified, so that should be cleared instead of destination.
1 parent 7fe232c commit 3356e78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ttyd-tools/rel/source/patch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ void writeBranch(void *ptr, void *destination)
1515
uint32_t *p = reinterpret_cast<uint32_t *>(ptr);
1616
*p = value;
1717

18-
ttyd::OSCache::DCFlushRange(destination, sizeof(uint32_t));
19-
ttyd::OSCache::ICInvalidateRange(destination, sizeof(uint32_t));
18+
ttyd::OSCache::DCFlushRange(ptr, sizeof(uint32_t));
19+
ttyd::OSCache::ICInvalidateRange(ptr, sizeof(uint32_t));
2020
}
2121

2222
}

0 commit comments

Comments
 (0)