diff options
author | José Fonseca <jfonseca@vmware.com> | 2015-02-12 21:35:30 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2015-02-12 21:45:09 +0000 |
commit | c2ad773e021e2897651e8f15b9f64a66568746ed (patch) | |
tree | 28b4a913987a3324916553a8b16f2e22388ed804 /thirdparty | |
parent | 06d1e449669ecdb5675c614b9f1732d62291b01b (diff) |
dxerr: Fixup DXTraceA implementation.
% specifiers were inadvertently corrupted by earlier changes.
Diffstat (limited to 'thirdparty')
-rw-r--r-- | thirdparty/dxerr/dxerr.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/thirdparty/dxerr/dxerr.cpp b/thirdparty/dxerr/dxerr.cpp index 31542ae7..26a13b20 100644 --- a/thirdparty/dxerr/dxerr.cpp +++ b/thirdparty/dxerr/dxerr.cpp @@ -11,7 +11,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. //-------------------------------------------------------------------------------------- -// This version only supports UNICODE. +// This version only supports ASCII. #include "dxerr.h" @@ -3978,7 +3978,7 @@ HRESULT WINAPI DXTraceA( const char* strFile, DWORD dwLine, HRESULT hr, sprintf_s( strBufferLine, 128, "%lu", dwLine ); if( strFile ) { - sprintf_s( strBuffer, BUFFER_SIZE, "s(s): ", strFile, strBufferLine ); + sprintf_s( strBuffer, BUFFER_SIZE, "%s(%s): ", strFile, strBufferLine ); OutputDebugStringA( strBuffer ); } @@ -3989,8 +3989,8 @@ HRESULT WINAPI DXTraceA( const char* strFile, DWORD dwLine, HRESULT hr, OutputDebugStringA( " " ); } - sprintf_s( strBufferError, 256, "s (0x%0.8x)", DXGetErrorStringA(hr), hr ); - sprintf_s( strBuffer, BUFFER_SIZE, "hr=s", strBufferError ); + sprintf_s( strBufferError, 256, "%s (0x%08lx)", DXGetErrorStringA(hr), hr ); + sprintf_s( strBuffer, BUFFER_SIZE, "hr=%s", strBufferError ); OutputDebugStringA( strBuffer ); OutputDebugStringA( "\n" ); @@ -4006,9 +4006,9 @@ HRESULT WINAPI DXTraceA( const char* strFile, DWORD dwLine, HRESULT hr, char strBufferMsg[1024]; strcpy_s( strBufferMsg, 1024, "" ); if( nMsgLen > 0 ) - sprintf_s( strBufferMsg, 1024, "Calling: s\n", strMsg ); + sprintf_s( strBufferMsg, 1024, "Calling: %s\n", strMsg ); - sprintf_s( strBuffer, BUFFER_SIZE, "File: s\nLine: s\nError Code: s\nsDo you want to debug the application?", + sprintf_s( strBuffer, BUFFER_SIZE, "File: %s\nLine: %s\nError Code: %s\n%sDo you want to debug the application?", strBufferFile, strBufferLine, strBufferError, strBufferMsg ); int nResult = MessageBoxA( GetForegroundWindow(), strBuffer, "Unexpected error encountered", MB_YESNO | MB_ICONERROR ); |