projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
254dbe7
)
Fix crash in mainmenu when loaded subgame does not have a "menu" directory
author
sfan5
<sfan5@live.de>
Tue, 21 Jul 2015 19:55:58 +0000
(21:55 +0200)
committer
sfan5
<sfan5@live.de>
Tue, 21 Jul 2015 19:55:58 +0000
(21:55 +0200)
builtin/mainmenu/textures.lua
patch
|
blob
|
history
diff --git
a/builtin/mainmenu/textures.lua
b/builtin/mainmenu/textures.lua
index 700bdb5cc05a0caa957cc1cd12723000c0dffd26..075f38ee073870c150776e911d8d3e990d4af170 100644
(file)
--- a/
builtin/mainmenu/textures.lua
+++ b/
builtin/mainmenu/textures.lua
@@
-144,10
+144,11
@@
function mm_texture.set_game(identifier, gamedetails)
end
-- Find out how many randomized textures the subgame provides
- local n, filename
+ local n = 0
+ local filename
local menu_files = core.get_dir_list(gamedetails.path .. DIR_DELIM .. "menu", false)
for i = 1, #menu_files do
-
local
filename = identifier .. "." .. i .. ".png"
+ filename = identifier .. "." .. i .. ".png"
if table.indexof(menu_files, filename) == -1 then
n = i - 1
break