Skip to content

Commit 3564bf5

Browse files
committed
rewrite code for clarity.
1 parent d7f4316 commit 3564bf5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/source/pl/core/evaluator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,9 @@ namespace pl::core {
711711
auto section = value->getSection();
712712
if (section != ptrn::Pattern::InstantiationSectionId) {
713713
if (heapSection || patternLocalSection) {
714-
u64 baseAddress = section ? 0 : getDataBaseAddress();
714+
u64 baseAddress = 0;
715+
if (section == ptrn::Pattern::MainSectionId)
716+
baseAddress = getDataBaseAddress();
715717
storage.resize(((value->getOffset() - baseAddress) & 0xFFFF'FFFF) + value->getSize());
716718
this->readData(value->getOffset(), storage.data(), value->getSize(), section);
717719
} else if (storage.size() < pattern->getOffset() + pattern->getSize()) {

0 commit comments

Comments
 (0)