mirror of
https://github.com/wiremod/wire.git
synced 2025-03-04 03:03:04 -05:00
Throw error if holo index is NaN (#3135)
* Save wiremod holograms from NaN indexes
This commit is contained in:
parent
5c5f3ddab4
commit
a47523bae5
@ -522,6 +522,7 @@ end
|
||||
-- Returns the hologram with the given index or nil if it doesn't exist.
|
||||
-- if shouldbenil is nil or false, assert that the hologram exists on @strict with an error. Otherwise, don't check (for holo creation, etc)
|
||||
local function CheckIndex(self, index, shouldbenil)
|
||||
if index ~= index then return self:throw("holo index is NaN!", nil) end
|
||||
index = math.Clamp(math.floor(index), -2^31, 2^31)
|
||||
local Holo
|
||||
if index<0 then
|
||||
|
Loading…
Reference in New Issue
Block a user