From: Huw Davies huw@codeweavers.com
--- tools/widl/parser.l | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 87a9fc55f07..9ff4e7b01f6 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -619,9 +619,10 @@ static void diagnostic( const struct location *where, const char *type, const ch fprintf( stderr, "%s", line );
line = buffer; - for (i = 0; i < where->first_column - 1; i++) line += sprintf( line, " " ); - line += sprintf( line, "^" ); - for (i = where->first_column + 1; i < where->last_column; i++) line += sprintf( line, "~" ); + for (i = 0; i < where->first_column - 1; i++) *line++ = ' '; + *line++ = '^'; + for (i = where->first_column + 1; i < where->last_column; i++) *line++ = '~'; + *line = '\0'; fprintf( stderr, "%s\n", buffer ); }
This merge request was approved by Elizabeth Figura.
This merge request was approved by Rémi Bernon.