Selaa lähdekoodia

fix(DemonEncounter): list index out of range

huangrunheng 2 vuotta sitten
vanhempi
sitoutus
c7718ec715
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      tasks/DemonEncounter/data/answer.py

+ 1 - 1
tasks/DemonEncounter/data/answer.py

@@ -101,7 +101,7 @@ class Answer:
                 if match == option:
                     return index + 1
         # 可能选项识别某一个字错误
-        if options[0] != '' and options[1] != '' and options[2] != '' and options[3] != '':
+        if all(options):
             for index, option in enumerate(options):
                 for match in question_matches:
                     if len(match) != len(option):