Commit 0844e447 authored by Alexandre Julliard's avatar Alexandre Julliard

dxerr9: Don't use snprintf().

parent 689f5c80
...@@ -18,10 +18,8 @@ ...@@ -18,10 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h>
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
...@@ -126,11 +124,11 @@ HRESULT WINAPI DXTraceA(const char* strFile, DWORD dwLine, HRESULT hr, const cha ...@@ -126,11 +124,11 @@ HRESULT WINAPI DXTraceA(const char* strFile, DWORD dwLine, HRESULT hr, const cha
char msg[1024]; char msg[1024];
if (bPopMsgBox) { if (bPopMsgBox) {
snprintf(msg, sizeof(msg), "File: %s\nLine: %d\nError Code: %s (0x%08x)\nCalling: %s", wsprintfA(msg, "File: %s\nLine: %d\nError Code: %s (0x%08x)\nCalling: %s",
strFile, dwLine, DXGetErrorString9A(hr), hr, strMsg); strFile, dwLine, DXGetErrorString9A(hr), hr, strMsg);
MessageBoxA(0, msg, "Unexpected error encountered", MB_OK|MB_ICONERROR); MessageBoxA(0, msg, "Unexpected error encountered", MB_OK|MB_ICONERROR);
} else { } else {
snprintf(msg, sizeof(msg), "%s(%d): %s (hr=%s (0x%08x))", strFile, wsprintfA(msg, "%s(%d): %s (hr=%s (0x%08x))", strFile,
dwLine, strMsg, DXGetErrorString9A(hr), hr); dwLine, strMsg, DXGetErrorString9A(hr), hr);
OutputDebugStringA(msg); OutputDebugStringA(msg);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment