From de88bf6b0749283fa8c0f1548e366efcb36759dd Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 11 Sep 2014 17:46:55 +0000 Subject: MenuItemEx: fixed crash on blob ID git-svn-id: http://svn.miranda-ng.org/main/trunk@10432 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MenuItemEx/src/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'plugins') 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); //!!!!!!!! -- cgit v1.2.3