summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-10-28 21:49:21 -0700
committeryenatch <yenatch@gmail.com>2014-10-28 21:53:08 -0700
commitaff76027a0aa8ec4cd3f4a392af8103063630be3 (patch)
treea91b26198e426ce0953b6847caa86f677099c85b
parent4d9fd56593b692fdd1a77f2763d4e3a2c2b1d3e8 (diff)
Fix the output of PointerLabelParam.to_asm.
Accidentally forgot to zfill either half of pointer_part, which would return malformed addresses. Fixes de39f7c6ff487f02d1914cc4a3260817287207c5.
-rw-r--r--pokemontools/crystal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pokemontools/crystal.py b/pokemontools/crystal.py
index 9d0fa5b..610f4f7 100644
--- a/pokemontools/crystal.py
+++ b/pokemontools/crystal.py
@@ -913,7 +913,7 @@ class PointerLabelParam(MultiByteParam):
lo, hi = self.bytes[1:3]
else:
lo, hi = self.bytes[0:2]
- pointer_part = "{0}{1:2x}{2:2x}".format(self.prefix, hi, lo)
+ pointer_part = "{0}{1:02x}{2:02x}".format(self.prefix, hi, lo)
# bank positioning matters!
if bank == True or bank == "reverse": # bank, pointer