summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-06-18 15:34:00 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-06-18 15:34:00 -0400
commitdf799584eca94f51870572612c333dc062982c0d (patch)
tree9b905bdd0d8aa31126cc0251dfa891207104aaa7 /tools
parent205e3d6a299aab4f9ee9c613234f359d11674c39 (diff)
Decompile pms to JSON
Diffstat (limited to 'tools')
-rw-r--r--tools/o2narc/o2narc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/o2narc/o2narc.cpp b/tools/o2narc/o2narc.cpp
index e4b46e2a..0a93df80 100644
--- a/tools/o2narc/o2narc.cpp
+++ b/tools/o2narc/o2narc.cpp
@@ -309,7 +309,11 @@ int main(int argc, char ** argv) {
delete[] _data;
}
// NARC members are contiguous in memory
- ofile.write(_rodata, (rodata_sec.sh_size + 3) & ~3);
+ ofile.write(_rodata, rodata_sec.sh_size);
+ if (!flatten && (rodata_sec.sh_size & 3)) {
+ for (int i = rodata_sec.sh_size & 3; i < 4; i++)
+ ofile.put(padding);
+ }
// Cleanup
delete[] _rodata;
ofile.close();