mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
widl: Avoid using sprintf() to add a single character.
This commit is contained in:
parent
f4c993c06e
commit
af3f67a5f4
Notes:
Alexandre Julliard
2024-09-06 22:38:19 +02:00
Approved-by: Rémi Bernon (@rbernon) Approved-by: Elizabeth Figura (@zfigura) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6417
1 changed files with 4 additions and 3 deletions
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue