shithub: pokecrystal

Download patch

ref: fcf43b13dabed748eba1737770eeb9f5d55820c5
parent: 3359121ba732f702fa3dbbc06357e3b5085a9067
author: Bryan Bishop <kanzure@gmail.com>
date: Sun Jul 1 04:41:14 EDT 2012

fix romstr for compiling (thanks pasky)

--- a/extras/romstr.py
+++ b/extras/romstr.py
@@ -72,7 +72,7 @@
 
         # scan the asm source code for labels
         if generate_labels:
-            asm = open("../main.asm", "r").read().split("\n")
+            asm = open(os.path.dirname(__file__) + "/../main.asm", "r").read().split("\n")
 
             for line in asm:
                 label = get_label_from_line(line)
@@ -446,7 +446,7 @@
         addresses = set()
 
         for (id, command) in self.asm_commands.items():
-            if command.has_key("target_address"):
+            if command.has_key("target_address") and command["id"] in call_commands:
                 addresses.add(command["target_address"])
 
         return addresses
--