From f5f976d4622c7581214c5135c65479d21af1491c Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Thu, 20 Aug 2015 10:12:42 +0000 Subject: Toaster: fixed memory corruption git-svn-id: http://svn.miranda-ng.org/main/trunk@14995 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Toaster/src/services.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/Toaster/src/services.cpp b/plugins/Toaster/src/services.cpp index 9987e29774..63f7ac839c 100644 --- a/plugins/Toaster/src/services.cpp +++ b/plugins/Toaster/src/services.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" __forceinline bool isChatRoom(MCONTACT hContact) -{ return (bool)db_get_b(hContact, ptrA(GetContactProto(hContact)), "ChatRoom", 0); +{ return (bool)db_get_b(hContact, GetContactProto(hContact), "ChatRoom", 0); } static void __cdecl OnToastNotificationClicked(void* arg) @@ -15,7 +15,7 @@ static void __cdecl OnToastNotificationClicked(void* arg) } else { - ptrA szProto(GetContactProto(hContact)); + const char *szProto = GetContactProto(hContact); ptrT szChatRoom(db_get_tsa(hContact, szProto, "ChatRoomID")); GCDEST gcd = { szProto, szChatRoom, GC_EVENT_CONTROL }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -41,7 +41,6 @@ static void ShowToastNotification(TCHAR* text, TCHAR* title, MCONTACT hContact) pai.hContact = hContact; if (ProtoServiceExists(szProto, PS_GETAVATARINFO)) { - CallProtoService(szProto, PS_GETAVATARINFO, (WPARAM)0, (LPARAM)&pai); imagePath = mir_tstrdup(pai.filename); } -- cgit v1.2.3