From 812f6240208bfca640e6aa883cdd47d976cb3e86 Mon Sep 17 00:00:00 2001 From: chcurran Date: Tue, 27 Apr 2021 14:22:29 -0700 Subject: [PATCH] add missing numeric caster for platform safe Lua integer use --- .../Execution/Interpreted/ExecutionInterpretedAPI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp index e3b488ba05..f0cea19645 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp @@ -697,7 +697,7 @@ namespace ScriptCanvas AZ_Assert(lua_islightuserdata(lua, 2), "Error in compiled lua file, 2nd argument to UnpackDependencyArgs is not userdata (AZStd::vector>*), but a :%s", lua_typename(lua, 2)); auto dependentAssets = reinterpret_cast>*>(lua_touserdata(lua, 2)); AZ_Assert(lua_isinteger(lua, 3), "Error in compiled Lua file, 3rd argument to UnpackDependencyArgs is not a number"); - const size_t dependentAssetsIndex = lua_tointeger(lua, 3); + const size_t dependentAssetsIndex = aznumeric_caster(lua_tointeger(lua, 3)); return DependencyConstructionPack{ executionState, dependentAssets, dependentAssetsIndex, (*dependentAssets)[dependentAssetsIndex].Get()->m_runtimeData }; }