pkgmgr: Fix crash when .conf release field is invalid
* Fixes Issue when trying to access online content
https://github.com/minetest/minetest/issues/10942
* backported
cd840b7c9d
This commit is contained in:
parent
2af5896ed1
commit
9d09cf17d2
@ -107,7 +107,7 @@ function get_mods(path,retval,modpack)
|
|||||||
-- Read from config
|
-- Read from config
|
||||||
toadd.name = name
|
toadd.name = name
|
||||||
toadd.author = mod_conf.author
|
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.path = prefix
|
||||||
toadd.type = "mod"
|
toadd.type = "mod"
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ function pkgmgr.get_texture_packs()
|
|||||||
retval[#retval + 1] = {
|
retval[#retval + 1] = {
|
||||||
name = item,
|
name = item,
|
||||||
author = conf:get("author"),
|
author = conf:get("author"),
|
||||||
release = tonumber(conf:get("release") or "0"),
|
release = tonumber(conf:get("release") or 0),
|
||||||
list_name = name,
|
list_name = name,
|
||||||
type = "txp",
|
type = "txp",
|
||||||
path = path,
|
path = path,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user