summaryrefslogtreecommitdiff
path: root/plugins/CmdLine
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-25 15:32:06 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-25 15:32:06 +0000
commita757184e5db3112d3de0b69eec7d39b937e396bc (patch)
treee903787b3ca3af22a4d95ddf757e178b23da8619 /plugins/CmdLine
parent33ebc5347bee5432ca63efb330acdd5a3b82f3fd (diff)
replace sprintf to mir_snprintf (part 5)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5481 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CmdLine')
-rw-r--r--plugins/CmdLine/src/utils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp
index 1dddb04310..37514b60d9 100644
--- a/plugins/CmdLine/src/utils.cpp
+++ b/plugins/CmdLine/src/utils.cpp
@@ -48,7 +48,7 @@ int Log(char *format, ...)
fputs(str, fout);
va_start(vararg, format);
- tBytes = _vsnprintf(str, sizeof(str), format, vararg);
+ tBytes = mir_vsnprintf(str, sizeof(str), format, vararg);
if (tBytes > 0)
{
str[tBytes] = 0;
@@ -71,7 +71,7 @@ int Info(char *title, char *format, ...)
va_list vararg;
int tBytes;
va_start(vararg, format);
- tBytes = _vsnprintf(str, sizeof(str), format, vararg);
+ tBytes = mir_vsnprintf(str, sizeof(str), format, vararg);
if (tBytes > 0)
{
str[tBytes] = 0;
@@ -102,12 +102,12 @@ char *BinToHex(int size, PBYTE data)
int maxSize = size * 2 + HEX_SIZE + 1;
szresult = (char *) new char[ maxSize ];
memset(szresult, 0, maxSize);
- sprintf(buffer, "%0*X", HEX_SIZE, size);
+ mir_snprintf(buffer, SIZEOF(buffer), "%0*X", HEX_SIZE, size);
strcpy(szresult, buffer);
int i;
for (i = 0; i < size; i++)
{
- sprintf(buffer, "%02X", data[i]);
+ mir_snprintf(buffer, SIZEOF(buffer), "%02X", data[i]);
strcpy(szresult + (HEX_SIZE + i * 2), buffer);
}
return szresult;
@@ -290,7 +290,7 @@ TCHAR *GetContactID(HANDLE hContact, char *szProto)
{
case CNFT_BYTE:
{
- _stprintf(tmp, _T("%d"), ctInfo.bVal);
+ mir_sntprintf(tmp, SIZEOF(tmp), _T("%d"), ctInfo.bVal);
buffer = _tcsdup(tmp);
break;
@@ -298,7 +298,7 @@ TCHAR *GetContactID(HANDLE hContact, char *szProto)
case CNFT_WORD:
{
- _stprintf(tmp, _T("%d"), ctInfo.wVal);
+ mir_sntprintf(tmp, SIZEOF(tmp), _T("%d"), ctInfo.wVal);
buffer = _tcsdup(tmp);
break;
@@ -306,7 +306,7 @@ TCHAR *GetContactID(HANDLE hContact, char *szProto)
case CNFT_DWORD:
{
- _stprintf(tmp, _T("%ld"), ctInfo.dVal);
+ mir_sntprintf(tmp, SIZEOF(tmp), _T("%ld"), ctInfo.dVal);
buffer = _tcsdup(tmp);
break;