mirror of
https://github.com/love2d/love.git
synced 2026-08-18 19:54:22 +02:00
Improved some error message text
This commit is contained in:
@@ -464,7 +464,7 @@ void luax_pushtype(lua_State *L, const char *name, bits flags, love::Object *dat
|
||||
|
||||
bool luax_istype(lua_State *L, int idx, love::bits type)
|
||||
{
|
||||
if (lua_isuserdata(L, idx) == 0)
|
||||
if (lua_type(L, idx) != LUA_TUSERDATA)
|
||||
return false;
|
||||
|
||||
return ((((Proxy *)lua_touserdata(L, idx))->flags & type) == type);
|
||||
|
||||
@@ -401,7 +401,7 @@ extern "C" { // Also called from luasocket
|
||||
template <typename T>
|
||||
T *luax_checktype(lua_State *L, int idx, const char *name, love::bits type)
|
||||
{
|
||||
if (lua_isuserdata(L, idx) == 0)
|
||||
if (lua_type(L, idx) != LUA_TUSERDATA)
|
||||
luax_typerror(L, idx, name);
|
||||
|
||||
Proxy *u = (Proxy *)lua_touserdata(L, idx);
|
||||
|
||||
Reference in New Issue
Block a user