summaryrefslogtreecommitdiff
path: root/plugins/YAMN/src/debug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/YAMN/src/debug.cpp')
-rw-r--r--plugins/YAMN/src/debug.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/YAMN/src/debug.cpp b/plugins/YAMN/src/debug.cpp
index c459d0cbb7..2f2d3d1069 100644
--- a/plugins/YAMN/src/debug.cpp
+++ b/plugins/YAMN/src/debug.cpp
@@ -43,21 +43,21 @@ void InitDebug()
InitializeCriticalSection(&FileAccessCS);
#ifdef DEBUG_SYNCHRO
- _stprintf(DebugFileName,DebugSynchroFileName2,DebugUserDirectory);
+ mir_sntprintf(DebugFileName, SIZEOF(DebugFileName), DebugSynchroFileName2, DebugUserDirectory);
SynchroFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL);
DebugLog(SynchroFile,"Synchro debug file created by %s\n",YAMN_VER);
#endif
#ifdef DEBUG_COMM
- _stprintf(DebugFileName,DebugCommFileName2,DebugUserDirectory);
+ mir_sntprintf(DebugFileName, SIZEOF(DebugFileName), DebugCommFileName2, DebugUserDirectory);
CommFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL);
DebugLog(CommFile,"Communication debug file created by %s\n",YAMN_VER);
#endif
#ifdef DEBUG_DECODE
- _stprintf(DebugFileName,DebugDecodeFileName2,DebugUserDirectory);
+ mir_sntprintf(DebugFileName, SIZEOF(DebugFileName), DebugDecodeFileName2, DebugUserDirectory);
DecodeFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL);
DebugLog(DecodeFile,"Decoding kernel debug file created by %s\n",YAMN_VER);
@@ -93,7 +93,7 @@ void DebugLog(HANDLE File,const char *fmt,...)
va_start(vararg,fmt);
str=(char *)malloc(strsize=65536);
mir_snprintf(tids, SIZEOF(tids), "[%x]",GetCurrentThreadId());
- while(_vsnprintf(str,strsize,fmt,vararg)==-1)
+ while(mir_vsnprintf(str, strsize, fmt, vararg)==-1)
str=(char *)realloc(str,strsize+=65536);
va_end(vararg);
EnterCriticalSection(&FileAccessCS);
@@ -114,7 +114,7 @@ void DebugLogW(HANDLE File,const WCHAR *fmt,...)
va_start(vararg,fmt);
str=(WCHAR *)malloc((strsize=65536)*sizeof(WCHAR));
mir_snprintf(tids, SIZEOF(tids), "[%x]",GetCurrentThreadId());
- while(_vsnwprintf(str,strsize,fmt,vararg)==-1)
+ while(mir_vsnwprintf(str, strsize, fmt, vararg)==-1)
str=(WCHAR *)realloc(str,(strsize+=65536)*sizeof(WCHAR));
va_end(vararg);
EnterCriticalSection(&FileAccessCS);