# HG changeset patch # User Tero Marttila # Date 1241541584 -10800 # Node ID 707ddd7a7912d7a3b9ac63e19fafb35889534966 # Parent e30e33081480a841ec29ae1bcbe03523cfa57f18 fix if fewer text than chars diff -r e30e33081480 -r 707ddd7a7912 index.py --- a/index.py Tue May 05 19:37:49 2009 +0300 +++ b/index.py Tue May 05 19:39:44 2009 +0300 @@ -131,6 +131,9 @@ chars = randomize(chars) for line, char, color in itertools.izip_longest(text, chars, line_colors, fillvalue=None) : + if not line : + continue + # pick position to place char pos = random.randint(1, len(line) - 1)