Stop processing input stream when the outermost RTF group is closed.
This commit is contained in:
parent
c158550998
commit
a49aa4c2b2
|
@ -540,10 +540,20 @@ RTFFont *fp;
|
||||||
info->csStack[info->csTop++] = info->curCharSet;
|
info->csStack[info->csTop++] = info->curCharSet;
|
||||||
break;
|
break;
|
||||||
case rtfEndGroup:
|
case rtfEndGroup:
|
||||||
|
/*
|
||||||
|
* If stack top is 1 at this point, we are ending the
|
||||||
|
* group started by the initial {, which ends the
|
||||||
|
* RTF stream
|
||||||
|
*/
|
||||||
if (info->csTop <= 0)
|
if (info->csTop <= 0)
|
||||||
RTFPanic (info,"_RTFGetToken: stack underflow");
|
RTFPanic (info,"_RTFGetToken: stack underflow");
|
||||||
info->curCharSet = info->csStack[--info->csTop];
|
else if (info->csTop == 1)
|
||||||
RTFSetCharSet (info, info->curCharSet);
|
info->rtfClass = rtfEOF;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
info->curCharSet = info->csStack[--info->csTop];
|
||||||
|
RTFSetCharSet (info, info->curCharSet);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue