From 4c7f077a102f35428766bb3fddb8a93e30313cc1 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Mon, 26 Aug 2019 17:12:12 +0800 Subject: fix --- xmake/core/base/serialize.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xmake/core/base/serialize.lua b/xmake/core/base/serialize.lua index 7c5c2200c..5ffb6b818 100644 --- a/xmake/core/base/serialize.lua +++ b/xmake/core/base/serialize.lua @@ -216,7 +216,9 @@ function serialize._resolveref(root, fenv, ...) end if type(pos) ~= "table" then local vpre = serialize._make(v, {}) - return nil, string.format("unable to resolve [%s] in /%s, which is %s", vpre, table.concat(path, "/", 1, i - 1), pos) + table.insert(path, 1, "") + local pathstr = table.concat(path, "/", 1, i) + return nil, string.format("unable to resolve [%s] in %s, which is %s", vpre, pathstr, pos) end pos = pos[v] end @@ -335,7 +337,7 @@ end function stub:__tostring() local fparams = {} for i = 1, self.params.n do - fparams[i] = serialize._make(self.params[i]) + fparams[i] = serialize._make(self.params[i], {}) end return string.format("%s(%s)", self.name, table.concat(fparams, ", ")) end -- cgit v1.3.1