[ox/preloader] Fix Vector preloading
This commit is contained in:
parent
fe42702e88
commit
cd4a9300a5
4
deps/ox/src/ox/preloader/preloader.hpp
vendored
4
deps/ox/src/ox/preloader/preloader.hpp
vendored
@ -188,7 +188,7 @@ constexpr ox::Error Preloader<PlatSpec>::field(CRStringView, const ox::BasicStri
|
||||
} else {
|
||||
a = restore;
|
||||
}
|
||||
vecVal.items = sz ? PlatSpec::correctEndianness(static_cast<typename PlatSpec::size_t>(a) + PlatSpec::RomStart) : 0;
|
||||
vecVal.items = PlatSpec::correctEndianness(static_cast<typename PlatSpec::size_t>(a) + PlatSpec::RomStart);
|
||||
oxReturnError(m_writer.seekp(a));
|
||||
oxReturnError(m_writer.write(val->data(), sz));
|
||||
oxReturnError(m_writer.seekp(restore));
|
||||
@ -306,7 +306,7 @@ constexpr ox::Error Preloader<PlatSpec>::fieldVector(CRStringView, const auto *v
|
||||
}
|
||||
// serialize the Vector
|
||||
oxReturnError(serialize(&m_writer, vecVal));
|
||||
m_ptrs.emplace_back(vecValPt + offsetof(ox::VectorMemMap<PlatSpec>, items), vecVal.items);
|
||||
m_ptrs.emplace_back(m_writer.tellp() - PlatSpec::PtrSize, vecVal.items);
|
||||
return {};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user