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

compat52.c lua_tounsignedx #22

Closed
dulm opened this issue Jul 12, 2013 · 1 comment
Closed

compat52.c lua_tounsignedx #22

dulm opened this issue Jul 12, 2013 · 1 comment

Comments

@dulm
Copy link

dulm commented Jul 12, 2013

在windows上正常工作。在android上 -0x1234转 unsinged int直接为0了,导致luaL_checkversion失败。 应该是undefined behaviour。
先转为int在android也正常工作了。

LUA_API lua_Unsigned
lua_tounsignedx(lua_State *L, int idx, int *isnum) {
lua_Number n = lua_tonumberx(L, idx, isnum);
return (lua_Unsigned)(int)n;
}

@cloudwu
Copy link
Owner

cloudwu commented Jul 15, 2013

fixed. thanks.

@cloudwu cloudwu closed this as completed Jul 15, 2013
@DeanHH DeanHH mentioned this issue Aug 23, 2018
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