summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift/client.cpp')
-rw-r--r--Sluift/client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sluift/client.cpp b/Sluift/client.cpp
index 63e3bf1..db259cd 100644
--- a/Sluift/client.cpp
+++ b/Sluift/client.cpp
@@ -57,19 +57,19 @@ static void addPayloadsToTable(lua_State* L, const std::vector<boost::shared_ptr
lua_rawseti(L, -2, boost::numeric_cast<int>(i+1));
}
Lua::registerGetByTypeIndex(L, -1);
lua_setfield(L, -2, "payloads");
}
}
static boost::shared_ptr<Payload> getPayload(lua_State* L, int index) {
if (lua_type(L, index) == LUA_TTABLE) {
- return Sluift::globals.elementConvertor.convertFromLua(L, index);
+ return boost::dynamic_pointer_cast<Payload>(Sluift::globals.elementConvertor.convertFromLua(L, index));
}
else if (lua_type(L, index) == LUA_TSTRING) {
return boost::make_shared<RawXMLPayload>(Lua::checkString(L, index));
}
else {
return boost::shared_ptr<Payload>();
}
}