mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Use LuaUtil::cast for casting sol::object to prevent crashing on type mismatch in Lua scripts.
This commit is contained in:
parent
61578ca39b
commit
c362b2efa6
12 changed files with 48 additions and 46 deletions
|
@ -106,7 +106,7 @@ namespace LuaUtil
|
|||
|
||||
bool BasicSerializer::serialize(BinaryData& out, const sol::userdata& data) const
|
||||
{
|
||||
appendRefNum(out, data.as<ESM::RefNum>());
|
||||
appendRefNum(out, cast<ESM::RefNum>(data));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue