missed one check

This commit is contained in:
z64a 2025-03-09 03:14:02 -04:00
parent a28777e060
commit 35e4c8cf51
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,10 @@ def process_file(file_path):
# Previous version mismatched loop iteration count and jump position, creating spurious labels in the process.
# Switch them back and use pos attribute to force fixed jump positions; leave the extra labels alone.
content = re.sub(
r'<Loop count="(\d+)" pos="(\d+)"/>', lambda m: f'<Loop count="{m.group(2)}" pos="{m.group(1)}"/>', content
)
content = re.sub(
r'<Loop count="(\d+)" dest="Pos_(\d+)"/>', lambda m: f'<Loop count="{m.group(2)}" pos="{m.group(1)}"/>', content
)