If I have the PDF sequence:-
BI /W 1 /H 1 /BPC 1 /F [/AHx] /IM true ID
FF>
EI
Which contains an array and AFAIK is valid PDF sequence of operators, this code fails:-
Code:
case CSymbol.BeginArray:
CArray array = new CArray();
Debug.Assert(this.operands.Count == 0, "Array within array...");
ParseObject(array, CSymbol.EndArray);
array.Add(this.operands);
this.operands.Clear();
this.operands.Add((CObject)array);
break;
By the time this is hit this.operands.Count will be 8, and yet there is no nested array. Also, this.operands.Clear() will remove the current ones but the operator isn't complete yet.