Fixed very rare occurrence with invtweak's formspec

- Solves #70 and crash on May 30th, 2015, 18h58
This commit is contained in:
LeMagnesium 2015-05-30 19:09:03 +02:00
parent 59f42c1935
commit 74d0303dc3
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ tweak.buttons = {
local function get_formspec_size(formspec)
local w = 8
local h = 7.5
if not formspec then return end
local sstring = string.find(formspec,"size[",1,true)
if sstring ~= nil then
sstring = string.sub(formspec, sstring+5)