Fixed a crash exploit (#462)

* Fixed a crash exploit

Spawning props with model scale set to 0 crashes dedicated servers.

* Update lua/advdupe2/sv_clipboard.lua

---------

Co-authored-by: thegrb93 <grbrown93@sbcglobal.net>
This commit is contained in:
Porky 2024-03-29 08:18:27 +13:00 committed by GitHub
parent f2936d5315
commit 0c6f311f3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -844,6 +844,8 @@ end
]]
local function MakeProp(Player, Pos, Ang, Model, PhysicsObject, Data)
if Data.ModelScale then Data.ModelScale = math.Clamp(Data.ModelScale, 1e-5, 1e5) end
if (not util.IsValidModel(Model) and not file.Exists(Data.Model, "GAME")) then
if (Player) then
reportmodel(Player, Data.Model)