Added extensions code submitted by Yefrei.
This commit is contained in:
@@ -153,13 +153,23 @@ void PrimNodeRecord::removeAllChildren()
|
|||||||
|
|
||||||
bool PrimNodeRecord::readExtensionLevel(Input& fr)
|
bool PrimNodeRecord::readExtensionLevel(Input& fr)
|
||||||
{
|
{
|
||||||
|
int extensionState = 1;
|
||||||
Record* pRec;
|
Record* pRec;
|
||||||
|
|
||||||
while (pRec=fr.readCreateRecord(_pFltFile))
|
while (pRec=fr.readCreateRecord(_pFltFile))
|
||||||
{
|
{
|
||||||
if (pRec->isOfType(POP_EXTENSION_OP))
|
if (pRec->isOfType(PUSH_EXTENSION_OP))
|
||||||
return true;
|
{
|
||||||
// ignore extensions for now
|
++extensionState;
|
||||||
|
}
|
||||||
|
else if (pRec->isOfType(POP_EXTENSION_OP))
|
||||||
|
{
|
||||||
|
--extensionState;
|
||||||
|
if ( !extensionState ) // PUSH'es and POP's have cancelled out
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user