Fix crash with floppy programmator

This commit is contained in:
Novatux 2015-02-17 21:01:08 +01:00
parent 6af36f2fdf
commit 2ed09a3fad

View File

@ -83,7 +83,7 @@ minetest.register_node("turtle:floppy_programmator",{
local prog = progs[fields.pselector]
local stack = inv:get_stack("floppy", 1):to_table()
if stack == nil then return end
if stack.name ~= "turtle:floppy" or stack:is_empty() then return end
if stack.name ~= "turtle:floppy" or stack.count == 0 then return end
local contents, update = handle_floppy_meta(stack)
set_floppy_contents(stack.metadata, prog)
if update then