summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/plugins/datamodel/lua')
-rw-r--r--src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp
index 4f78e7d..92866ee 100644
--- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp
@@ -163,9 +163,10 @@ static luabridge::LuaRef getDataAsLua(lua_State* _luaState, const Data& data) {
luaData = luabridge::newTable(_luaState);
std::map<std::string, Data>::const_iterator compoundIter = data.compound.begin();
while(compoundIter != data.compound.end()) {
- if (isInteger(compoundIter->first.c_str(), 10) && strTo<size_t>(compoundIter->first) > 0) {
+ if (isInteger(compoundIter->first.c_str(), 10) && strTo<long>(compoundIter->first) > 0) {
// it makes a difference whether we pass a numeric string or a proper number!
- luaData[strTo<size_t>(compoundIter->first)] = getDataAsLua(_luaState, compoundIter->second);
+ // MSVC throws assertion with LuaBridge for size_t instead of int
+ luaData[strTo<long>(compoundIter->first)] = getDataAsLua(_luaState, compoundIter->second);
} else {
luaData[compoundIter->first] = getDataAsLua(_luaState, compoundIter->second);
}