Skip to content

Commit

Permalink
Fix incorrect justification of Name and Publisher
Browse files Browse the repository at this point in the history
It padded \x00 to the LEFT of the name/publisher, which is a bit odd considering it is named rjust. This didn't cause any actual problem somehow, as something down the line "fixed" or "ignored" the issue. Probably hacbrewpack.
  • Loading branch information
rlaphoenix committed Oct 3, 2023
1 parent 61efced commit 7bd255f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nton/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ def build(
# only keep one name/publisher, store as AmericanEnglish
# this is because the CLI has only one name/publisher option to use
control_file_data[0x0:0x3000] = b"\x00" * 0x3000
control_file_data[0x0:0x200] = name.encode("utf8").rjust(0x200, b"\x00")
control_file_data[0x200:0x300] = publisher.encode("utf8").rjust(0x100, b"\x00")
control_file_data[0x0:0x200] = name.encode("utf8").ljust(0x200, b"\x00")
control_file_data[0x200:0x300] = publisher.encode("utf8").ljust(0x100, b"\x00")

if version:
version_utf8 = version.encode("utf8")
Expand Down

0 comments on commit 7bd255f

Please sign in to comment.