diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-08 22:38:13 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-08 22:38:13 -0400 |
| commit | e424223cfb0aaea137b98f233de6fa7384a3901c (patch) | |
| tree | 0774827a22c1aed2aaf359d5faf743d4270e8f6b | |
| parent | 5569896671215223047773321111725273168431 (diff) | |
[SharedCache] Fix exception message causing an exception
And also removed unneeded VMReader construction in ApplyRegion
| -rw-r--r-- | view/sharedcache/core/MappedFileAccessor.h | 2 | ||||
| -rw-r--r-- | view/sharedcache/core/SharedCacheController.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/view/sharedcache/core/MappedFileAccessor.h b/view/sharedcache/core/MappedFileAccessor.h index a63d8506..35d2d5e7 100644 --- a/view/sharedcache/core/MappedFileAccessor.h +++ b/view/sharedcache/core/MappedFileAccessor.h @@ -19,7 +19,7 @@ public: { thread_local std::string message; message = - fmt::format("Tried to access unmapped address {0:x} for file with length of {01:x}", m_address, m_fileLen); + fmt::format("Tried to access unmapped address {0:x} for file with length of {1:x}", m_address, m_fileLen); return message.c_str(); } }; diff --git a/view/sharedcache/core/SharedCacheController.cpp b/view/sharedcache/core/SharedCacheController.cpp index 8d036b4a..8420d358 100644 --- a/view/sharedcache/core/SharedCacheController.cpp +++ b/view/sharedcache/core/SharedCacheController.cpp @@ -133,11 +133,10 @@ bool SharedCacheController::ApplyRegion(BinaryView& view, const CacheRegion& reg } auto vm = m_cache.GetVirtualMemory(); - auto reader = VirtualMemoryReader(vm); DataBuffer buffer = {}; try { - buffer = reader.ReadBuffer(region.start, region.size); + buffer = vm->ReadBuffer(region.start, region.size); } catch (std::exception& e) { |
