Update src/core/memory.cpp

Co-authored-by: LC <mathew1800@gmail.com>
This commit is contained in:
bunnei
2020-12-20 22:52:05 -08:00
committed by GitHub
parent 099937c484
commit a1dd8d5d3b

View File

@@ -692,7 +692,7 @@ struct Memory::Impl {
template <typename T>
void Write(const VAddr vaddr, const T data) {
// Avoid adding any extra logic to this fast-path block
if (u8* const pointer = current_page_table->pointers[vaddr >> PAGE_BITS]; pointer) {
if (u8* const pointer = current_page_table->pointers[vaddr >> PAGE_BITS]) {
std::memcpy(&pointer[vaddr], &data, sizeof(T));
return;
}