Skip to content

Commit 7241125

Browse files
committed
Fix a bug in print_large_string
1 parent 35999be commit 7241125

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,11 @@ def print_large_string(large_string):
511511
for string_part in range(num_parts):
512512
start_index = string_part * string_limit
513513
if string_part == num_parts - 1:
514-
print large_string[start_index:]
514+
sys.stdout.write(large_string[start_index:])
515515
else:
516-
end_index = ((string_part + 1) * string_limit) - 1
517-
print large_string[start_index:end_index],
516+
sys.stdout.write(large_string[start_index:
517+
start_index + string_limit])
518+
sys.stdout.write("\n")
518519

519520
def intelhex_offset(filename, offset):
520521
"""Load a hex or bin file at a particular offset"""

0 commit comments

Comments
 (0)