mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Added cycle detection to Variant
We accidentally enabled nested tables previously, and now it errors properly when the tables contain cycles. Before you'd get (or at least I got) a nice lua stack overflow error. --HG-- branch : minor
This commit is contained in:
@@ -38,7 +38,9 @@ int w_Thread_start(lua_State *L)
|
||||
|
||||
for (int i = 0; i < nargs; ++i)
|
||||
{
|
||||
args.push_back(Variant::fromLua(L, i+2));
|
||||
luax_catchexcept(L, [&]() {
|
||||
args.push_back(Variant::fromLua(L, i+2));
|
||||
});
|
||||
|
||||
if (args.back().getType() == Variant::UNKNOWN)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user