From 452587cdeefbf6e3bf1eee91e4e976f1135b785f Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Fri, 29 Jan 2016 16:15:09 +0100 Subject: 2016-01-28 22:37:00 --- tex/context/base/mkiv/mlib-lua.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tex/context/base/mkiv/mlib-lua.lua') diff --git a/tex/context/base/mkiv/mlib-lua.lua b/tex/context/base/mkiv/mlib-lua.lua index e7f8f9cc5..baf9346c4 100644 --- a/tex/context/base/mkiv/mlib-lua.lua +++ b/tex/context/base/mkiv/mlib-lua.lua @@ -296,16 +296,14 @@ function metapost.runscript(code) if result then local t = type(result) if t == "number" then - t = f_numeric(result) - elseif t == "string" then - t = result - else - t = tostring(result) + result = f_numeric(result) + elseif t ~= "string" then + result = tostring(result) end if trace then - report_luarun("result: %s",code) + report_luarun("result: %s",result) end - return t + return result elseif trace then report_luarun("no result") end -- cgit v1.2.3