Skip to content
Permalink
Browse files

pkgmgr: Fix crash when .conf release field is invalid

Fixes #10942
  • Loading branch information
rubenwardy committed Feb 28, 2021
1 parent 225e690 commit b390bd2ea5c40cb96af1699a6a18f59dcdb1495b
Showing with 2 additions and 2 deletions.
  1. +2 −2 builtin/mainmenu/pkgmgr.lua
@@ -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,
@@ -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"

0 comments on commit b390bd2

Please sign in to comment.