[keel] Make PreloadPtr 64 bit

This commit is contained in:
2023-04-01 19:51:31 -05:00
parent 2a8f7e074f
commit b56d3692d0
2 changed files with 6 additions and 6 deletions

View File

@@ -119,7 +119,7 @@ ox::Result<std::size_t> getPreloadAddr(keel::Context *ctx, ox::CRStringView path
oxRequire(buff, static_cast<ox::MemFS*>(ctx->rom.get())->directAccess(path));
PreloadPtr p;
oxReturnError(ox::readMC(buff, stat.size, &p));
return p.preloadAddr + ctx->preloadSectionOffset;
return static_cast<std::size_t>(p.preloadAddr) + ctx->preloadSectionOffset;
}
ox::Result<std::size_t> getPreloadAddr(keel::Context *ctx, const ox::FileAddress &file) noexcept {
@@ -127,7 +127,7 @@ ox::Result<std::size_t> getPreloadAddr(keel::Context *ctx, const ox::FileAddress
oxRequire(buff, static_cast<ox::MemFS*>(ctx->rom.get())->directAccess(file));
PreloadPtr p;
oxReturnError(ox::readMC(buff, stat.size, &p));
return p.preloadAddr + ctx->preloadSectionOffset;
return static_cast<std::size_t>(p.preloadAddr) + ctx->preloadSectionOffset;
}
}