[ox] GBA fixes
This commit is contained in:
7
deps/ox/src/ox/claw/write.hpp
vendored
7
deps/ox/src/ox/claw/write.hpp
vendored
@ -93,7 +93,14 @@ Result<String> writeClawHeader(T *t, ClawFormat fmt) noexcept {
|
||||
|
||||
Result<Buffer> writeClaw(auto *t, ClawFormat fmt = ClawFormat::Metal) {
|
||||
oxRequire(header, detail::writeClawHeader(t, fmt));
|
||||
#ifdef OX_USE_STDLIB
|
||||
oxRequire(data, fmt == ClawFormat::Metal ? writeMC(t) : writeOC(t));
|
||||
#else
|
||||
if (fmt != ClawFormat::Metal) {
|
||||
return OxError(1, "OC is not supported in this build");
|
||||
}
|
||||
oxRequire(data, writeMC(t));
|
||||
#endif
|
||||
Buffer out(header.len() + data.size());
|
||||
memcpy(out.data(), header.data(), header.len());
|
||||
memcpy(out.data() + header.len(), data.data(), data.size());
|
||||
|
Reference in New Issue
Block a user