From 051181fa6ee00d8379e8a7dc7442b58342d4352b Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 9 Jul 2022 22:32:08 +0200 Subject: Enforce limits of settings that could cause buggy behaviour (#12450) Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt). --- builtin/mainmenu/dlg_contentstore.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/mainmenu') diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua index 11eaceac3..2152b8a39 100644 --- a/builtin/mainmenu/dlg_contentstore.lua +++ b/builtin/mainmenu/dlg_contentstore.lua @@ -191,7 +191,7 @@ end local function queue_download(package, reason) local max_concurrent_downloads = tonumber(core.settings:get("contentdb_max_concurrent_downloads")) - if number_downloading < max_concurrent_downloads then + if number_downloading < math.max(max_concurrent_downloads, 1) then start_install(package, reason) else table.insert(download_queue, { package = package, reason = reason }) -- cgit v1.2.3