mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 03:39:14 +00:00
Fix argument validation in Lua command cell:getAll
This commit is contained in:
parent
89c18d85de
commit
e96864a79c
@ -88,19 +88,15 @@ namespace MWLua
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = true;
|
||||||
sol::optional<uint32_t> typeId = sol::nullopt;
|
if (!type.has_value())
|
||||||
if (type.has_value())
|
cell.mStore->forEach(std::move(visitor));
|
||||||
typeId = ids[*type];
|
else if (ids[*type] == sol::nil)
|
||||||
|
ok = false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok = true;
|
uint32_t typeId = ids[*type];
|
||||||
cell.mStore->forEach(std::move(visitor));
|
switch (typeId)
|
||||||
}
|
|
||||||
if (typeId.has_value())
|
|
||||||
{
|
|
||||||
ok = true;
|
|
||||||
switch (*typeId)
|
|
||||||
{
|
{
|
||||||
case ESM::REC_INTERNAL_PLAYER:
|
case ESM::REC_INTERNAL_PLAYER:
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user