Mwyann / ydkjs

You Don't Know Javascript
https://www.ydkjs.eu/
GNU General Public License v3.0
60 stars 9 forks source link

Jackattack correct answer not registered #2

Open Mwyann opened 5 years ago

Mwyann commented 5 years ago

From mail:

I noticed a bug in the Jack Attack. The category I forget was something about amputee jokes; I was able to guess correctly and incorrectly, but there were 2 matches in this set where clicking the correct match on screen registered as incorrect -- I am pretty sure they are correct, though. The matches were (clue: answer) --

Torso on the wall: Art Torso in the pool: Bob

They came by twice and each time when I chose the answer it registered as incorrect.

mar0th commented 3 years ago

I can confirm this bug.

It appears only when the unanswered questions are repeated and shown a second time.

Tested with multiple categories in the French and German versions.

In line 294 of ModeJackAttack.js currentQuestion is used for checking the answer. But with every played question currentQuestion is incremented by one which means that after all questions are played once, the check for the correct answer is always failing.