Secure-Cast icon indicating copy to clipboard operation
Secure-Cast copied to clipboard

NextRecord can be nil when accessed

Open KendallCole opened this issue 1 year ago • 0 comments

Line 212 of https://github.com/1Axen/Secure-Cast/blob/main/src/Simulation/init.lua can sometimes error if NextRecord is null.

Line 218's null check should come first i.e.

--> Previous record is guaranteed to exist due to it being in the grid
if not NextRecord then
	continue
end

--> Avoid checking teammates
local Player = NextRecord.Player or PreviousRecord.Player
if Player and IsPlayerFriendly(Caster, Player) then
	continue
end

KendallCole avatar Sep 06 '24 22:09 KendallCole