diff --git a/apps/openmw/mwscript/containerextensions.cpp b/apps/openmw/mwscript/containerextensions.cpp index 4e3e010f7..366e88f1e 100644 --- a/apps/openmw/mwscript/containerextensions.cpp +++ b/apps/openmw/mwscript/containerextensions.cpp @@ -317,7 +317,7 @@ namespace MWScript it != invStore.end(); ++it) { if (::Misc::StringUtils::ciEqual(it->getCellRef().getSoul(), name)) - ++count; + count += it->getRefData().getCount(); } runtime.push(count); }