Richedit fonttbl parsing correction

Bill Medland billmedland at mercuryspeed.com
Sat Jan 10 22:55:39 CST 2004


Bill Medland (billmedland at mercuryspeed.com)
Correct handling of font table when the font name is not the last thing
in the entry (i.e. is followed by the font altname in a group)
(Prevents infinite loop on some RTF streams)
(Also fixed accidental switch flowthrough)

Index: wine/dlls/richedit/reader.c
===================================================================
RCS file: /home/wine/wine/dlls/richedit/reader.c,v
retrieving revision 1.11
diff -u -r1.11 reader.c
--- wine/dlls/richedit/reader.c	18 Nov 2002 23:13:05 -0000	1.11
+++ wine/dlls/richedit/reader.c	9 Jan 2004 23:47:53 -0000
@@ -1197,6 +1197,7 @@
 					/* ignore token but announce it */
 					RTFMsg ("%s: unknown token \"%s\"\n",
 							fn, rtfTextBuf);
+                                        break;
 				case rtfFontFamily:
 					fp->rtfFFamily = rtfMinor;
 					break;
@@ -1239,9 +1240,8 @@
 			else if (rtfClass == rtfText)	/* font name */
 			{
 				bp = buf;
-				while (rtfClass != rtfEOF
-					&& !RTFCheckCM (rtfText, ';')
-					&& !RTFCheckCM (rtfGroup, rtfEndGroup))
+                                while (rtfClass == rtfText
+                                        && !RTFCheckCM (rtfText, ';'))
 				{
 					*bp++ = rtfMajor;
 					(void) RTFGetToken ();





More information about the wine-patches mailing list