Skip to content

Commit

Permalink
Fix win32 error report in read_stdin()
Browse files Browse the repository at this point in the history
In commit 887c9d9 ("Print error message strings on Windows") we stopped
printing opaque hex error codes and started using FormatMessage(). We
missed one conversion of a %lx format specifier to %s in an error message.

Now that commit 50900dd marked the relevant functions with the printf
attribute, the compiler told us about it.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Dec 7, 2014
1 parent 50900dd commit 192eb4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Expand Up @@ -367,7 +367,7 @@ static void read_stdin(char **string, int hidden)
nr_read = WideCharToMultiByte(CP_UTF8, 0, wbuf, -1, NULL, 0, NULL, NULL);
if (!nr_read) {
char *errstr = openconnect__win32_strerror(GetLastError());
fprintf(stderr, _("Error converting console input: %lx\n"),
fprintf(stderr, _("Error converting console input: %s\n"),
errstr);
free(errstr);
goto out;
Expand Down

0 comments on commit 192eb4f

Please sign in to comment.