https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f6f66fa987a9d80e2aaa20...
commit f6f66fa987a9d80e2aaa20e6c10901525db7031b Author: Alexey Gorgurov leha-bot@ya.ru AuthorDate: Fri Jun 28 23:15:00 2019 +0300 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Sat Jun 29 16:58:47 2019 +0200
[NETSTAT] Fix TCP/UDP output. (#1696) CORE-16151
The underlying StringCchPrintfW() function must use %S for CHAR strings and %s for wide chars. See https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-... for details. --- base/applications/network/netstat/netstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/base/applications/network/netstat/netstat.c b/base/applications/network/netstat/netstat.c index 0e8146f81b..9dab17daf6 100644 --- a/base/applications/network/netstat/netstat.c +++ b/base/applications/network/netstat/netstat.c @@ -482,7 +482,7 @@ VOID ShowTcpTable(VOID) PID[0] = 0; }
- ConPrintf(StdOut, L" %-6s %-22s %-22s %-11s %s\n", L"TCP", + ConPrintf(StdOut, L" %-6s %-22S %-22S %-11s %S\n", L"TCP", Host, Remote, TcpState[tcpTable->table[i].dwState], PID); } } @@ -536,7 +536,7 @@ VOID ShowUdpTable(VOID) PID[0] = 0; }
- ConPrintf(StdOut, L" %-6s %-22s %-34s %s\n", L"UDP", Host, L"*:*", PID); + ConPrintf(StdOut, L" %-6s %-22S %-34s %S\n", L"UDP", Host, L"*:*", PID); }
HeapFree(GetProcessHeap(), 0, udpTable);