Re-add clamp for backgrounds beyond the limit

pull/75/head
Ishaan Bhardwaj 2023-07-16 01:54:20 -04:00
parent 6fb583e463
commit 50410958f0
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ image_formats = {".png", ".jpg"}
bgpath = "res/backgrounds/"
dir = love.filesystem.getDirectoryItems(bgpath)
local backgrounds = {}
backgrounds = {}
local function loadExtendedBgs()
extended_bgs = require("res.backgrounds.extend_section_bg")

View File

@ -980,7 +980,7 @@ end
function GameMode:drawBackground()
local id = self:getBackground()
-- if type(id) == "number" then id = clamp(id, 0, #backgrounds) end
if type(id) == "number" then id = clamp(id, 0, #backgrounds) end
love.graphics.setColor(1, 1, 1, 1)
drawBackground(id)
end