Skip to content

Commit e424223

Browse files
committed
[SharedCache] Fix exception message causing an exception
And also removed unneeded VMReader construction in ApplyRegion
1 parent 5569896 commit e424223

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

view/sharedcache/core/MappedFileAccessor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class UnmappedAccessException : public std::exception
1919
{
2020
thread_local std::string message;
2121
message =
22-
fmt::format("Tried to access unmapped address {0:x} for file with length of {01:x}", m_address, m_fileLen);
22+
fmt::format("Tried to access unmapped address {0:x} for file with length of {1:x}", m_address, m_fileLen);
2323
return message.c_str();
2424
}
2525
};

view/sharedcache/core/SharedCacheController.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,10 @@ bool SharedCacheController::ApplyRegion(BinaryView& view, const CacheRegion& reg
133133
}
134134

135135
auto vm = m_cache.GetVirtualMemory();
136-
auto reader = VirtualMemoryReader(vm);
137136
DataBuffer buffer = {};
138137
try
139138
{
140-
buffer = reader.ReadBuffer(region.start, region.size);
139+
buffer = vm->ReadBuffer(region.start, region.size);
141140
}
142141
catch (std::exception& e)
143142
{

0 commit comments

Comments
 (0)