asqapro / ShenanigansImpostorPlugins

Plugins for Shenanigans private Impostor server
1 stars 0 forks source link

Jester causes server crash #4

Closed asqapro closed 3 years ago

asqapro commented 3 years ago

Bug Report

Plugin affected; Special Roles

If a Jester is in the game and someone votes to skip, the Jester class runs into a null reference exception. Unsure of what exactly is null.

asqapro commented 3 years ago

Pretty sure I fixed this. Issue was Jester was checking who was voted for before checking the vote type. If the vote type was skip, there is no one who was voted, which resulted in the null reference exception. I pushed the fix straight to master, along with another bug, The other bug was the Jester thinking it won when no one voted because the Jester was only checking for greater than, not greater or equal on votes.