From ff3ed4b81bbd444ac881aef4b1d01090b57cbe01 Mon Sep 17 00:00:00 2001 From: Lila Date: Mon, 28 Oct 2024 12:03:38 +0000 Subject: [PATCH] Fix empty text files --- fast64_internal/sm64/sm64_utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: