richedit: Properly handle lack of semicolon after font name in rtf.

This was partially handled by ungetting the end group token (i.e. '}')
so that it was read again at the proper place.  Unfortunately there is a
read hook that maintains a stackTop variable, which is decremented when
receiving this end group token.  Therefore stackTop would get
decremented twice, and the rich text file would end prematurely.

This is fixed by incrementing the stackTop variable to compensate for it
being decremented twice.
This commit is contained in:
Dylan Smith 2009-03-23 13:24:27 -04:00 committed by Alexandre Julliard
parent 2592fea305
commit 78a7ea5a39
1 changed files with 5 additions and 0 deletions

View File

@ -475,6 +475,11 @@ static void RTFUngetToken(RTF_Info *info)
info->pushedMinor = info->rtfMinor; info->pushedMinor = info->rtfMinor;
info->pushedParam = info->rtfParam; info->pushedParam = info->rtfParam;
lstrcpyA (info->pushedTextBuf, info->rtfTextBuf); lstrcpyA (info->pushedTextBuf, info->rtfTextBuf);
/* The read hook decrements stackTop on rtfEndGroup, so
* increment the value to compensate for it being decremented
* twice due to the RTFUngetToken. */
if(RTFCheckCM (info, rtfGroup, rtfEndGroup))
info->stackTop++;
} }