Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LuaViewSDK 里的Lua虚拟机的_G被hack过么? #19

Closed
tangyiyang opened this issue May 22, 2016 · 1 comment
Closed

LuaViewSDK 里的Lua虚拟机的_G被hack过么? #19

tangyiyang opened this issue May 22, 2016 · 1 comment

Comments

@tangyiyang
Copy link

tangyiyang commented May 22, 2016

目前还没看源代码,想给自己从前写的lib引入LuaViewSDK的时候发现了一些小问题。
TestCase:

local t = {

}
function t.r(...)
    print(...)
end

_G["rrr"] = t.r

t.r(1,2,3)
rrr(1,2,3,4)

```Lua

输出结果是

1   2   3
2   3   4
@Lamod
Copy link
Contributor

Lamod commented May 24, 2016

t.r()这种函数调用语法修改过,改成t.r = function(...)应该就正常了。
后面会改回标准语法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants