diff --git a/src/api/api.c b/src/api/api.c index 21e42de4..03a3851f 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -108,7 +108,7 @@ int luax_typeerror(lua_State* L, int index, const char* expected) { } else { name = luaL_typename(L, index); } - const char* message = lua_pushfstring(L, "%s expected, got %s", name, expected); + const char* message = lua_pushfstring(L, "%s expected, got %s", expected, name); return luaL_argerror(L, index, message); }