-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy-lookup.exe
returns wrong result
#3818
Comments
Good find. But let me ask: why is this a bug report and not a Pull Request in https://github.com/git-for-windows/build-extra? ;-) |
For two reasons:
I am sorry to have troubled you. |
Oh, your change is correct all right!
Most likely a change in behavior by
I welcome your contribution. Please open a Pull Request and I will work with you to get it integrated. |
In ISO C, specifier for wide character strings is "%ls". As this source code is compiled with mingw-win64 which complies the standard, this change uses "%ls" instead of "%s". See git-for-windows/git#3818
In ISO C, specifier for wide character strings is "%ls". As this source code is compiled with GCC of mingw-w64 which complies the standard, this change uses "%ls" instead of "%s". See git-for-windows/git#3818
In ISO C, specifier for wide character strings is "%ls". As this source code is compiled with GCC of mingw-w64 which complies the standard, this change uses "%ls" instead of "%s". See git-for-windows/git#3818 Signed-off-by: Sakai Takashi <miimou@gmail.com>
The `proxy-lookup` helper [only reported the first letter of the proxy](git-for-windows/git#3818), which was fixed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Setup
defaults?
Any other interesting things about your environment that might be related
to the issue you're seeing?
proxy-lookup.exe
, I have aproxy.pac
set when I found this problem.Details
Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
proxy.pac
that specifies proxy for192.168.0.0/24
modified the code to close connection after sending file to avoid stall by Keep-Alive
proxy.pac
proxy-lookup.exe
to lookup proxy for http://192.168.0.1/What did you expect to occur after running these commands?
What actually happened instead?
My thought
proxy-lookup.c
lines 83 and 85,format string used in
wprintf
for wide character string is%s
, but it should be%ls
.printf
in cppreference.com says that%ls
is forwchar_t*
and%s
is forchar*
in bothprintf
andwprintf
.says that
%s
is forwchar_t*
inwprintf
, but it is marked as Microsoft-specific.mingw-w64's source code for
printf
familyimplements
%s
to be interpreted aschar*
.The text was updated successfully, but these errors were encountered: