Code

frontend/grammar: Fixed format argument used in yyerrorf().
authorSebastian Harl <sh@tokkee.org>
Mon, 2 Mar 2015 06:41:55 +0000 (07:41 +0100)
committerSebastian Harl <sh@tokkee.org>
Mon, 2 Mar 2015 06:41:55 +0000 (07:41 +0100)
src/frontend/grammar.y

index db3df642d3525c9ec729159eb45e4fd4034079bc..e36df3b490abc041421c617f11a80b1df1b03313 100644 (file)
@@ -580,7 +580,7 @@ expression:
                        if (! $1) {
                                /* we should have better error messages here
                                 * TODO: maybe let the analyzer handle this instead */
-                               sdb_fe_yyerrorf(&yylloc, scanner,
+                               sdb_fe_yyerror(&yylloc, scanner,
                                                YY_("syntax error, invalid arithmetic expression"));
                                YYABORT;
                        }
@@ -858,7 +858,7 @@ sdb_fe_yyerrorf(YYLTYPE *lval, sdb_fe_yyscan_t scanner, const char *fmt, ...)
        va_start(ap, fmt);
        va_copy(aq, ap);
        sdb_vlog(SDB_LOG_ERR, fmt, ap);
-       sdb_strbuf_vsprintf(errbuf, "%s", aq);
+       sdb_strbuf_vsprintf(errbuf, fmt, aq);
        va_end(ap);
 } /* sdb_fe_yyerrorf */