Fix Bug in modname guessing resulting in undefined modname
authorsapier <Sapier at GMX dot net>
Wed, 17 Jul 2013 19:04:17 +0000 (21:04 +0200)
committerPilzAdam <pilzadam@minetest.net>
Mon, 22 Jul 2013 16:10:00 +0000 (18:10 +0200)
builtin/modmgr.lua

index bf71d8b1d67786e69fd91ed7922778d4a5036d32..3256c3b9f9a0fcc64eabc8fe14361cad42ff2c5f 100644 (file)
@@ -151,7 +151,11 @@ function modmgr.parse_register_line(line)
                        local pos3 = item:find(":")
                        
                        if pos3 ~= nil then
-                               return item:sub(1,pos3-1)
+                               local retval = item:sub(1,pos3-1)
+                               if retval ~= nil and
+                                       retval ~= "" then
+                                       return retval
+                               end 
                        end
                end
        end