diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-09-05 08:37:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 08:37:16 -0400 |
commit | 7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (patch) | |
tree | e96334bd9299102ebdaf229eec9cf4c2165f8c2f /indra/llcommon/lua_function.cpp | |
parent | 487973d3f0ee9b8583b3d977ca6a405cba5fe518 (diff) | |
parent | 6a747e1ce027700a3609f4c377179bfa29c3ce31 (diff) |
Merge pull request #2450 from secondlife/lua-merge
Merge updated 'main' branch into release/luau-scripting
Diffstat (limited to 'indra/llcommon/lua_function.cpp')
-rw-r--r-- | indra/llcommon/lua_function.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llcommon/lua_function.cpp b/indra/llcommon/lua_function.cpp index 880bc209f6..c0090dd395 100644 --- a/indra/llcommon/lua_function.cpp +++ b/indra/llcommon/lua_function.cpp @@ -3,7 +3,7 @@ * @author Nat Goodspeed * @date 2024-02-05 * @brief Implementation for lua_function. - * + * * $LicenseInfo:firstyear=2024&license=viewerlgpl$ * Copyright (c) 2024, Linden Research, Inc. * $/LicenseInfo$ @@ -418,7 +418,7 @@ void lua_pushllsd(lua_State* L, const LLSD& data) case LLSD::TypeMap: { // push a new table with space for our non-array keys - lua_createtable(L, 0, data.size()); + lua_createtable(L, 0, narrow(data.size())); for (const auto& pair: llsd::inMap(data)) { // push value -- so now table is at -2, value at -1 @@ -432,7 +432,7 @@ void lua_pushllsd(lua_State* L, const LLSD& data) case LLSD::TypeArray: { // push a new table with space for array entries - lua_createtable(L, data.size(), 0); + lua_createtable(L, narrow(data.size()), 0); lua_Integer key{ 0 }; for (const auto& item: llsd::inArray(data)) { @@ -700,11 +700,11 @@ void LuaState::check_interrupts_counter() // of interrupting itself at a moment when re-entry is not valid. So only // touch data in this LuaState. ++mInterrupts; - if (mInterrupts > INTERRUPTS_MAX_LIMIT) + if (mInterrupts > INTERRUPTS_MAX_LIMIT) { lluau::error(mState, "Possible infinite loop, terminated."); } - else if (mInterrupts % INTERRUPTS_SUSPEND_LIMIT == 0) + else if (mInterrupts % INTERRUPTS_SUSPEND_LIMIT == 0) { LL_DEBUGS("Lua") << LLCoros::getName() << " suspending at " << mInterrupts << " interrupts" << LL_ENDL; |