Skip to content

Commit b390bd2

Browse files
committedFeb 28, 2021
pkgmgr: Fix crash when .conf release field is invalid
Fixes #10942
1 parent 225e690 commit b390bd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎builtin/mainmenu/pkgmgr.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ local function load_texture_packs(txtpath, retval)
9090
retval[#retval + 1] = {
9191
name = item,
9292
author = conf:get("author"),
93-
release = tonumber(conf:get("release") or "0"),
93+
release = tonumber(conf:get("release")) or 0,
9494
list_name = name,
9595
type = "txp",
9696
path = path,
@@ -135,7 +135,7 @@ function get_mods(path,retval,modpack)
135135
-- Read from config
136136
toadd.name = name
137137
toadd.author = mod_conf.author
138-
toadd.release = tonumber(mod_conf.release or "0")
138+
toadd.release = tonumber(mod_conf.release) or 0
139139
toadd.path = prefix
140140
toadd.type = "mod"
141141

0 commit comments

Comments
 (0)
Please sign in to comment.