Author: pschweitzer
Date: Sat Dec 20 16:40:57 2014
New Revision: 65763
URL:
http://svn.reactos.org/svn/reactos?rev=65763&view=rev
Log:
[TREE]
Convert resources strings to OEM before printing them on console.
Fixes broken displays with special chars
Modified:
trunk/reactos/base/applications/cmdutils/tree/tree.c
Modified: trunk/reactos/base/applications/cmdutils/tree/tree.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/tree/tree.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/tree/tree.c [iso-8859-1] Sat Dec 20 16:40:57
2014
@@ -26,11 +26,13 @@
VOID PrintResourceString(INT resID, ...)
{
WCHAR tmpBuffer[STR_MAX];
+ CHAR tmpBufferA[STR_MAX];
va_list arg_ptr;
va_start(arg_ptr, resID);
LoadStringW(GetModuleHandle(NULL), resID, tmpBuffer, STR_MAX);
- vfwprintf(stdout, tmpBuffer, arg_ptr);
+ CharToOemW(tmpBuffer, tmpBufferA);
+ vfprintf(stdout, tmpBufferA, arg_ptr);
va_end(arg_ptr);
}