From 144824b6082d2d39432ba8c6c8c6a00f747896b6 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Mon, 22 Apr 2019 12:23:18 -0700 Subject: [PATCH] Fix indexerror from long text --- horsay | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horsay b/horsay index 37e75e8..51224f4 100755 --- a/horsay +++ b/horsay @@ -26,7 +26,7 @@ horse_half = [ ] for i in range(max(len(horse_half), len(text_half))): - if horse_half[i][-1] == '\u2500' and text_half[i][0] == '\u2502': + if i < min(len(horse_half), len(text_half)) and horse_half[i][-1] == '\u2500' and text_half[i][0] == '\u2502': text_half[i] = '\u2524' + text_half[i][1:] if i < len(horse_half): sys.stdout.write(horse_half[i])