fixed bug

This commit is contained in:
UndeadMaelys 2021-05-30 10:05:44 +02:00
parent 0d2700d8b4
commit 9ecc8091fc
1 changed files with 4 additions and 2 deletions

View File

@ -15,6 +15,8 @@ end
function GetUnrepeatedReadingON(lAvoid) function GetUnrepeatedReadingON(lAvoid)
lKanji = KanjiData[math.random(#KanjiData)] lKanji = KanjiData[math.random(#KanjiData)]
if #lKanji.On == 0 then GetUnrepeatedKanji(lAvoid) end
for j=1, #lKanji.On do for j=1, #lKanji.On do
for i=1, #lAvoid do for i=1, #lAvoid do
if lKanji.On[j] == lAvoid[i] then if lKanji.On[j] == lAvoid[i] then
@ -29,7 +31,7 @@ end
function GetUnrepeatedReadingKUN(lAvoid) function GetUnrepeatedReadingKUN(lAvoid)
lKanji = KanjiData[math.random(#KanjiData)] lKanji = KanjiData[math.random(#KanjiData)]
if lKanji.Kun == nil then GetUnrepeatedKanji(lAvoid) end if #lKanji.Kun == 0 then GetUnrepeatedKanji(lAvoid) end
for j=1, #lKanji.Kun do for j=1, #lKanji.Kun do
for i=1, #lAvoid do for i=1, #lAvoid do
@ -218,7 +220,7 @@ while 1 do
os.execute("clear") os.execute("clear")
ShowProgress() ShowProgress()
Ask() Ask(math.random(2)+2)
response = io.read() response = io.read()
Check(response) Check(response)