From 5c657a221ff97de7c86a70a8b94617c1672c37e3 Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Thu, 19 Sep 2013 17:14:13 +0800 Subject: [PATCH] Ignore out-of-bound error in MarkCommentRow --- convert.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/convert.py b/convert.py index 5e7087f..dec839a 100755 --- a/convert.py +++ b/convert.py @@ -55,8 +55,11 @@ def FindAlternativeRow(rows, c, height, bottomReserved): def MarkCommentRow(rows, c, row): - for i in range(row, row+math.ceil(c[7])): - rows[c[4]][i] = c + try: + for i in range(row, row+math.ceil(c[7])): + rows[c[4]][i] = c + except IndexError: + pass def WriteComment(f, c, row, width, height, bottomReserved, fontsize, lifetime):