* data/skeletons/yacc.c (yyerrlab): here.
---
 data/skeletons/yacc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/data/skeletons/yacc.c b/data/skeletons/yacc.c
index 1f16a733..242cca4a 100644
--- a/data/skeletons/yacc.c
+++ b/data/skeletons/yacc.c
@@ -1769,16 +1769,16 @@ yyerrlab:
             if (yymsg != yymsgbuf)
               YYSTACK_FREE (yymsg);
             yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, 
yymsg_alloc)));
-            if (!yymsg)
+            if (yymsg)
               {
-                yymsg = yymsgbuf;
-                yymsg_alloc = sizeof yymsgbuf;
-                yysyntax_error_status = 2;
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
               }
             else
               {
-                yysyntax_error_status = YYSYNTAX_ERROR;
-                yymsgp = yymsg;
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
               }
           }
         yyerror (]b4_yyerror_args[yymsgp);
-- 
2.24.1


Reply via email to