diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-09-11 17:46:55 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-09-11 17:46:55 +0000 |
commit | de88bf6b0749283fa8c0f1548e366efcb36759dd (patch) | |
tree | 14f8301b782308171d080e72aae7924208afd414 /plugins/MenuItemEx/src | |
parent | 2ba67eb43c31f37d87b60f920be31f85e5273865 (diff) |
MenuItemEx: fixed crash on blob ID
git-svn-id: http://svn.miranda-ng.org/main/trunk@10432 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MenuItemEx/src')
-rw-r--r-- | plugins/MenuItemEx/src/main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 337237a28a..648037ea64 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -283,7 +283,14 @@ void GetID(MCONTACT hContact, LPSTR szProto, LPSTR szID) else if (dbv_uniqueid.type == DBVT_WORD)
wsprintfA(szID, "%u", dbv_uniqueid.wVal); //!!!!!!!!!
else if (dbv_uniqueid.type == DBVT_BLOB)
- wsprintfA(szID, "%s", dbv_uniqueid.cpbVal); //!!!!!!!!!
+ {
+ for (int i = 0; i < dbv_uniqueid.cpbVal; i++)
+ {
+ char tmp[3];
+ mir_snprintf(tmp, SIZEOF(tmp), "%02X", (BYTE)dbv_uniqueid.pbVal[i]);
+ strcat(szID, tmp); //!!!!!!!!!
+ }
+ }
else
wsprintfA(szID, "%s", dbv_uniqueid.pszVal); //!!!!!!!!
|