diff options
| -rw-r--r-- | tests/testmod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/testmod.c b/tests/testmod.c index 345a8c9..3bf2cd3 100644 --- a/tests/testmod.c +++ b/tests/testmod.c | |||
| @@ -70,7 +70,7 @@ static int test_getseti (lua_State *L) { | |||
| 70 | static int test_getextraspace (lua_State *L) { | 70 | static int test_getextraspace (lua_State *L) { |
| 71 | size_t len = 0; | 71 | size_t len = 0; |
| 72 | char const* s = luaL_optlstring(L, 1, NULL, &len); | 72 | char const* s = luaL_optlstring(L, 1, NULL, &len); |
| 73 | void* p = lua_getextraspace(L); | 73 | char* p = (char*)lua_getextraspace(L); |
| 74 | lua_pushstring(L, p); | 74 | lua_pushstring(L, p); |
| 75 | if (s) | 75 | if (s) |
| 76 | memcpy(p, s, len > LUA_EXTRASPACE-1 ? LUA_EXTRASPACE-1 : len+1); | 76 | memcpy(p, s, len > LUA_EXTRASPACE-1 ? LUA_EXTRASPACE-1 : len+1); |
