From 84293c9d7a1aca3f423fb2308348a4016dd672a1 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 5 Jan 2009 15:40:22 +0900 Subject: [PATCH] fix bug in type answer --- ankiqt/ui/view.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ankiqt/ui/view.py b/ankiqt/ui/view.py index 17f5ee12f..5adea5c21 100644 --- a/ankiqt/ui/view.py +++ b/ankiqt/ui/view.py @@ -151,7 +151,11 @@ class View(object): given = unicode(self.main.mainWin.typeAnswerField.text()) res = [] for (i, c) in enumerate(given): - if c == cor[i]: + try: + yes = c == cor[i] + except IndexError: + yes = False + if yes: res.append("%s" % c) else: res.append("%s" % c)