pkgmgr: Fix crash when .conf release field is invalid
This commit is contained in:
parent
10c6ed6ca1
commit
e99363e4e9
@ -51,7 +51,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"
|
||||
|
||||
@ -99,7 +99,7 @@ function pkgmgr.get_texture_packs()
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user