Skip to content

Commit

Permalink
issue #15 fix a bug with type checking in debug.setlocal() introduced…
Browse files Browse the repository at this point in the history
… in last commit
  • Loading branch information
dibyendumajumdar committed Oct 25, 2015
1 parent d970aa9 commit 1c5e5d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ldebug.c
Expand Up @@ -198,7 +198,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {
** We need to ensure that this function does
** not subvert the types of local variables
*/
if (type != RAVI_TANY) {
if (type == RAVI_TNUMFLT || type == RAVI_TNUMINT || type == RAVI_TARRAYFLT || type == RAVI_TARRAYINT) {
StkId input = L->top - 1;
compatible = (type == RAVI_TNUMFLT && ttisfloat(input))
|| (type == RAVI_TNUMINT && ttisinteger(input))
Expand Down

0 comments on commit 1c5e5d6

Please sign in to comment.