Skip to content

Commit

Permalink
Update ldr_ro.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
noumidev committed Sep 13, 2023
1 parent 505d54d commit 29e3aa9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/services/ldr_ro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ namespace CROHeader {
NameOffset = 0x084,
NextCRO = 0x088,
PrevCRO = 0x08C,
OnUnresolved = 0x0AC,
CodeOffset = 0x0B0,
DataOffset = 0x0B8,
OnUnresolved = 0x0AC,
ModuleNameOffset = 0x0C0,
SegmentTableOffset = 0x0C8,
SegmentTableSize = 0x0CC,
Expand Down Expand Up @@ -137,6 +137,10 @@ struct CROHeaderEntry {

static constexpr u32 CRO_HEADER_SIZE = 0x138;

static const std::string CRO_MAGIC("CRO0");
static const std::string CRO_MAGIC_FIXED("FIXD");
static const std::string CRR_MAGIC("CRR0");

class CRO {
Memory &mem;

Expand Down Expand Up @@ -293,7 +297,7 @@ class CRO {

// Verify CRO magic
const std::string magic = mem.readString(croPointer + CROHeader::ID, 4);
if (magic.compare(std::string("CRO0")) != 0) {
if (magic.compare(CRO_MAGIC) != 0) {
return false;
}

Expand Down

0 comments on commit 29e3aa9

Please sign in to comment.