diff --git a/fast64_internal/sm64/sm64_utility.py b/fast64_internal/sm64/sm64_utility.py index 97a9287a..caf171a1 100644 --- a/fast64_internal/sm64/sm64_utility.py +++ b/fast64_internal/sm64/sm64_utility.py @@ -313,7 +313,7 @@ def write_or_delete_if_found( footer_pos -= diff additions = "" - if text[footer_pos - 1] not in {"\n", "\r"}: # add new line if not there + if text and text[footer_pos - 1] not in {"\n", "\r"}: # add new line if not there additions += "\n" for descriptor in to_add: if descriptor in found_matches: