Skip to content

Commit

Permalink
pkgmgr: Fix crash when .conf release field is invalid
Browse files Browse the repository at this point in the history
Fixes #10942
  • Loading branch information
rubenwardy committed Feb 28, 2021
1 parent 225e690 commit b390bd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builtin/mainmenu/pkgmgr.lua
Expand Up @@ -90,7 +90,7 @@ local function load_texture_packs(txtpath, retval)
retval[#retval + 1] = {
name = item,
author = conf:get("author"),
release = tonumber(conf:get("release") or "0"),
release = tonumber(conf:get("release")) or 0,
list_name = name,
type = "txp",
path = path,
Expand Down Expand Up @@ -135,7 +135,7 @@ function get_mods(path,retval,modpack)
-- Read from config
toadd.name = name
toadd.author = mod_conf.author
toadd.release = tonumber(mod_conf.release or "0")
toadd.release = tonumber(mod_conf.release) or 0
toadd.path = prefix
toadd.type = "mod"

Expand Down

0 comments on commit b390bd2

Please sign in to comment.