diff --git a/.gitignore b/.gitignore index 786db912..528462ad 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ fb.bat *.smdh config.toml +CMakeSettings.json diff --git a/src/core/services/ldr_ro.cpp b/src/core/services/ldr_ro.cpp index 2ad62d99..a6114729 100644 --- a/src/core/services/ldr_ro.cpp +++ b/src/core/services/ldr_ro.cpp @@ -437,7 +437,7 @@ public: const u32 segmentID = mem.read32(segmentTable.offset + 12 * segment + SegmentTable::ID); switch (segmentID) { case SegmentTable::SegmentID::DATA: - *oldDataVaddr = segmentOffset + dataVaddr; oldDataSegmentOffset = segmentOffset; segmentOffset = dataVaddr; break; + *oldDataVaddr = segmentOffset + croPointer; oldDataSegmentOffset = segmentOffset; segmentOffset = dataVaddr; break; case SegmentTable::SegmentID::BSS: segmentOffset = bssVaddr; break; case SegmentTable::SegmentID::TEXT: case SegmentTable::SegmentID::RODATA: