diff options
Diffstat (limited to 'tools/o2narc/o2narc.cpp')
-rw-r--r-- | tools/o2narc/o2narc.cpp | 6 |
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(); |