From 23fbb3b65d41fb341b135c506136fa4c7b5d0dcf Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Wed, 18 Jan 2012 13:48:53 -0600 Subject: finish bank $22 with texts hg-commit-id: 5ad22b1fd1b8 --- extras/analyze_texts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'extras') diff --git a/extras/analyze_texts.py b/extras/analyze_texts.py index f34cea99..c008c870 100644 --- a/extras/analyze_texts.py +++ b/extras/analyze_texts.py @@ -401,6 +401,7 @@ def text_pretty_printer_at(start_address, label="SomeLabel"): #start with zero please byte_count = 0 + output = "" had_text_end_byte = False had_text_end_byte_57_58 = False had_db_last = False @@ -549,7 +550,7 @@ def text_pretty_printer_at(start_address, label="SomeLabel"): output += "\n" include_newline = "\n" - if output[-1] == "\n": + if len(output)!=0 and output[-1] == "\n": include_newline = "" output += include_newline + "; " + hex(start_address) + " + " + str(byte_count) + " bytes = " + hex(start_address + byte_count) print output -- cgit v1.2.3