Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Fix getSphereOffset rare crash
Browse files Browse the repository at this point in the history
There was a bug that would rarely occur if a Curve Clear was triggered at the very start of the path.
This was triggerable via fireballs, albeit rarely.

(dear god I hope this doesn't introduce another bug)

Fixes #12
  • Loading branch information
ShamblesSM committed Feb 6, 2023
1 parent c1f3cf9 commit 9929a05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SphereGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ end


function SphereGroup:getSphereOffset(sphereID)
return self.offset + self.spheres[sphereID].offset
return self.offset + ((_MathAreKeysInTable(self.spheres, sphereID) and self.spheres[sphereID].offset) or 0)
end


Expand Down

0 comments on commit 9929a05

Please sign in to comment.