CLuaInstance: Fix compiler warnings

This commit is contained in:
M. Liebmann
2016-04-24 19:35:32 +02:00
parent 46659ddaf0
commit 10f17ad5ee
3 changed files with 5 additions and 3 deletions

View File

@@ -625,8 +625,10 @@ CLuaData *CLuaInstance::CheckData(lua_State *L, int narg)
{
luaL_checktype(L, narg, LUA_TUSERDATA);
void *ud = luaL_checkudata(L, narg, className);
if (!ud)
if (!ud) {
fprintf(stderr, "[CLuaInstance::%s] wrong type %p, %d, %s\n", __func__, L, narg, className);
return NULL;
}
return *(CLuaData **)ud; // unbox pointer
}