summaryrefslogtreecommitdiff
path: root/plugins/MenuItemEx
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-22 17:54:52 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-22 17:54:52 +0000
commit44775ea68f894c3e236cdc397d6b0856c5882143 (patch)
tree32088426164d4aec937c4ce82f0725e600c4ba66 /plugins/MenuItemEx
parent01de930753fd7a5d47c0350a4361949d770b93cf (diff)
replace sprintf to mir_snprintf (part 2)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5447 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MenuItemEx')
-rw-r--r--plugins/MenuItemEx/src/main.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 30168a3466..37e33d37d2 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -297,13 +297,13 @@ void GetID(HANDLE hContact,LPSTR szProto,LPSTR szID)
if ( uID && db_get(hContact, szProto, uID ,&dbv_uniqueid) == 0 ) {
if (dbv_uniqueid.type == DBVT_DWORD)
- wsprintfA(szID, "%u", dbv_uniqueid.dVal);
+ wsprintfA(szID, "%u", dbv_uniqueid.dVal); //!!!!!!!!!
else if (dbv_uniqueid.type == DBVT_WORD)
- wsprintfA(szID, "%u", dbv_uniqueid.wVal);
+ wsprintfA(szID, "%u", dbv_uniqueid.wVal); //!!!!!!!!!
else if (dbv_uniqueid.type == DBVT_BLOB)
- wsprintfA(szID, "%s", dbv_uniqueid.cpbVal);
+ wsprintfA(szID, "%s", dbv_uniqueid.cpbVal); //!!!!!!!!!
else
- wsprintfA(szID, "%s", dbv_uniqueid.pszVal);
+ wsprintfA(szID, "%s", dbv_uniqueid.pszVal); //!!!!!!!!
db_free(&dbv_uniqueid);
}
@@ -370,10 +370,12 @@ void getIP(HANDLE hContact,LPSTR szProto,LPSTR szIP)
char szrIP[64] = {0};
DWORD mIP = db_get_dw(hContact, szProto, "IP", 0);
DWORD rIP = db_get_dw(hContact, szProto, "RealIP", 0);
- if ( mIP ) wsprintfA(szmIP, "External IP: %d.%d.%d.%d\r\n", mIP>>24,(mIP>>16)&0xFF,(mIP>>8)&0xFF,mIP&0xFF);
- if ( rIP ) wsprintfA(szrIP, "Internal IP: %d.%d.%d.%d\r\n", rIP>>24,(rIP>>16)&0xFF,(rIP>>8)&0xFF,rIP&0xFF);
- strcpy(szIP,szrIP);
- strcat(szIP,szmIP);
+ if (mIP)
+ mir_snprintf(szmIP, SIZEOF(szmIP), "External IP: %d.%d.%d.%d\r\n", mIP>>24, (mIP>>16)&0xFF, (mIP>>8)&0xFF, mIP&0xFF);
+ if (rIP)
+ mir_snprintf(szrIP, SIZEOF(szrIP), "Internal IP: %d.%d.%d.%d\r\n", rIP>>24, (rIP>>16)&0xFF, (rIP>>8)&0xFF, rIP&0xFF);
+ strcpy(szIP, szrIP);
+ strcat(szIP, szmIP);
}
LPSTR getMirVer(HANDLE hContact)