diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2022-07-09 22:32:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 22:32:08 +0200 |
commit | 051181fa6ee00d8379e8a7dc7442b58342d4352b (patch) | |
tree | 58ad84f05310024b311c533684defdbeb5ee3e84 /builtin/mainmenu/dlg_contentstore.lua | |
parent | 7c261118e06c630ea9ad00f20d7005b8edc108dd (diff) | |
download | minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.gz minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.bz2 minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.zip |
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).
Diffstat (limited to 'builtin/mainmenu/dlg_contentstore.lua')
-rw-r--r-- | builtin/mainmenu/dlg_contentstore.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 }) |