mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-19 03:39:58 +00:00
container iterator fix
This commit is contained in:
parent
52e5e14654
commit
498530fad7
@ -228,6 +228,11 @@ MWWorld::ContainerStoreIterator::ContainerStoreIterator (int mask, ContainerStor
|
|||||||
: mType (0), mMask (mask), mContainer (container)
|
: mType (0), mMask (mask), mContainer (container)
|
||||||
{
|
{
|
||||||
nextType();
|
nextType();
|
||||||
|
|
||||||
|
if (mType==-1 || (**this).getRefData().getCount())
|
||||||
|
return;
|
||||||
|
|
||||||
|
++*this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MWWorld::ContainerStoreIterator::incType()
|
void MWWorld::ContainerStoreIterator::incType()
|
||||||
@ -249,7 +254,7 @@ void MWWorld::ContainerStoreIterator::nextType()
|
|||||||
{
|
{
|
||||||
incType();
|
incType();
|
||||||
|
|
||||||
if (mType & mMask)
|
if ((mType & mMask) && mType>0)
|
||||||
if (resetIterator())
|
if (resetIterator())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user