1
0
зеркало из https://github.com/lisacvuk/minetest-toolranks.git synced 2025-07-02 08:00:40 +02:00

Crash fix - check if description is nil before trying to search it. (#3)

Этот коммит содержится в:
Argyle
2019-03-14 20:13:16 -04:00
коммит произвёл lisacvuk
родитель 5f87854323
Коммит ea5426316e

Просмотреть файл

@ -10,7 +10,9 @@ toolranks.colors = {
}
function toolranks.get_tool_type(description)
if string.find(description, "Pickaxe") then
if not description then
return "tool"
elseif string.find(description, "Pickaxe") then
return "pickaxe"
elseif string.find(description, "Axe") then
return "axe"