Skip to content

Commit

Permalink
Fix crash when error()ing an invalid value
Browse files Browse the repository at this point in the history
See #337 for details.
  • Loading branch information
numberZero committed May 8, 2017
1 parent f9ebbdc commit 564bdc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesecons_luacontroller/init.lua
Expand Up @@ -478,7 +478,7 @@ local function reset_meta(pos, code, errmsg)
local meta = minetest.get_meta(pos)
meta:set_string("code", code)
code = minetest.formspec_escape(code or "")
errmsg = minetest.formspec_escape(errmsg or "")
errmsg = minetest.formspec_escape(tostring(errmsg or ""))
meta:set_string("formspec", "size[12,10]"..
"background[-0.2,-0.25;12.4,10.75;jeija_luac_background.png]"..
"textarea[0.2,0.2;12.2,9.5;code;;"..code.."]"..
Expand Down

0 comments on commit 564bdc2

Please sign in to comment.