summaryrefslogtreecommitdiff
path: root/indra/llcommon/lua_function.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-05 08:40:49 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-05 08:40:49 -0400
commit22a47eee84dbaa5c731c000c6013ca558bd15892 (patch)
tree8b3128fdb91731d95025b86701431826c441c5ba /indra/llcommon/lua_function.cpp
parenta6b85244a6f943a4598ff9b7b8a3343eb1e0d11e (diff)
parent7ac4c3b56e5246fceaa73e7c9c665d3c04827d6c (diff)
Merge branch 'release/luau-scripting' into lua-resultset
Diffstat (limited to 'indra/llcommon/lua_function.cpp')
-rw-r--r--indra/llcommon/lua_function.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llcommon/lua_function.cpp b/indra/llcommon/lua_function.cpp
index c3d336bfcb..f7876e4aaf 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$
@@ -463,7 +463,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
@@ -477,7 +477,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))
{
@@ -897,11 +897,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;