aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compat.c b/src/compat.c
index bccd05f..d9bc3dd 100644
--- a/src/compat.c
+++ b/src/compat.c
@@ -78,11 +78,16 @@ int lua_getiuservalue( lua_State* L, int idx, int n)
78 78
79int lua_setiuservalue( lua_State* L, int idx, int n) 79int lua_setiuservalue( lua_State* L, int idx, int n)
80{ 80{
81 if( n > 1) 81 if( n > 1
82#if LUA_VERSION_NUM == 501
83 || lua_type( L, -1) != LUA_TTABLE
84#endif
85 )
82 { 86 {
83 lua_pop( L, 1); 87 lua_pop( L, 1);
84 return 0; 88 return 0;
85 } 89 }
90
86 (void) lua_setuservalue( L, idx); 91 (void) lua_setuservalue( L, idx);
87 return 1; // I guess anything non-0 is ok 92 return 1; // I guess anything non-0 is ok
88} 93}