[PATCH 1/8] [WinHlp32]: properly handle a syntax error inside a macro

Eric Pouech eric.pouech at orange.fr
Sat May 30 07:26:21 CDT 2009




A+
---

 programs/winhlp32/macro.lex.l |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/programs/winhlp32/macro.lex.l b/programs/winhlp32/macro.lex.l
index f3366b0..4442473 100644
--- a/programs/winhlp32/macro.lex.l
+++ b/programs/winhlp32/macro.lex.l
@@ -293,13 +293,15 @@ BOOL MACRO_ExecuteMacro(LPCSTR macro)
             break;
         default:
             WINE_WARN("got unexpected type %s\n", ts(t));
-            return 0;
+            YY_FLUSH_BUFFER;
+            ret = FALSE;
+            goto done;
         }
         switch (t = yylex())
         {
         case EMPTY:     goto done;
         case ';':       break;
-        default:        ret = FALSE; goto done;
+        default:        ret = FALSE; YY_FLUSH_BUFFER; goto done;
         }
     }
 





More information about the wine-patches mailing list