Richedit fonttbl parsing correction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bill Medland (billmedland@xxxxxxxxxxxxxxxx)
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 ();




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux