Fix invalid variable reuse.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 20 Jul 2017 15:15:15 +0000 (11:15 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 20 Jul 2017 15:15:15 +0000 (11:15 -0400)
make_dungeon.py

index ddbfc2e6fcf77a2f6b2f78706339867957c62b3d..b37856368947d219bcb5a79ef66deeaf38fdbdcf 100755 (executable)
@@ -384,8 +384,8 @@ def get_objects(obj):
             if labels:
                 global statedefines
                 statedefines += "/* States for %s */\n" % item[0]
-                for (i, label) in enumerate(labels):
-                    statedefines += "#define %s\t%d\n" % (label, i)
+                for (j, label) in enumerate(labels):
+                    statedefines += "#define %s\t%d\n" % (label, j)
                 statedefines += "\n"
         sounds_str = ""
         if attr.get("sounds") == None: