1
0

Guareded load
All checks were successful
LÖVE/Lua Library / Lua-Testing (push) Successful in 8s
LÖVE/Lua Library / Static-Analysis (push) Successful in 3s

This commit is contained in:
Jon Michael Aanes 2025-04-19 22:56:08 +02:00
parent 65991b5062
commit 2eb3878fa7

View File

@ -295,7 +295,11 @@ local function load_quad_data (filename)
local chunk, error_msg local chunk, error_msg
if define_love then if define_love then
chunk, error_msg = love.filesystem.load(filename..filetype) if love.filesystem.exists(filename..filetype) then
chunk, error_msg = love.filesystem.load(filename..filetype)
else
chunk, error_msg = nil, 'Does not exist'
end
else else
chunk, error_msg = loadfile(filename..filetype) chunk, error_msg = loadfile(filename..filetype)
end end