diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-10 16:52:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-10 16:52:55 +0000 |
commit | 568b27ff1197231b26d097dc05bcbb27ddd53efa (patch) | |
tree | f869b9bcd4728d3635b1c8af89b5f324e96f7482 /plugins | |
parent | 247b795b92ea954f376d029a24b945d45458ab10 (diff) |
memory corruption fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@5637 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 15 | ||||
-rw-r--r-- | plugins/TabSRMM/src/typingnotify.cpp | 22 |
2 files changed, 17 insertions, 20 deletions
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 1b13bdc5f1..0d75bd4532 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -436,7 +436,7 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam) }
else fShowOnClist = FALSE;
- if ((!foundWin || !(pContainer->dwFlags&CNT_NOSOUND)) && preTyping != (lParam != 0))
+ if ((!foundWin || !(pContainer->dwFlags & CNT_NOSOUND)) && preTyping != (lParam != 0))
SkinPlaySound((lParam) ? "TNStart" : "TNStop");
if (M.GetByte(SRMSGMOD, "ShowTypingPopup", 0)) {
@@ -529,18 +529,15 @@ int CMimAPI::ProtoAck(WPARAM wParam, LPARAM lParam) return 0;
}
}
- if (iFound == SendQueue::NR_SENDJOBS) // no mathing entry found in this queue entry.. continue
+ if (iFound == SendQueue::NR_SENDJOBS) // no mathing entry found in this queue entry.. continue
continue;
else
break;
}
- if (iFound == SendQueue::NR_SENDJOBS) { // no matching send info found in the queue
- sendLater->processAck(pAck); //
- return 0; // try to find the process handle in the list of open send later jobs
- } else { // the job was found
+ if (iFound == SendQueue::NR_SENDJOBS) // no matching send info found in the queue
+ sendLater->processAck(pAck);
+ else // try to find the process handle in the list of open send later jobs
SendMessage(jobs[iFound].hwndOwner, HM_EVENTSENT, (WPARAM)MAKELONG(iFound, i), lParam);
- return 0;
- }
}
return 0;
}
@@ -556,7 +553,7 @@ int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) if (szProto) {
// leave this menu item hidden for chats
if ( !db_get_b(hContact, szProto, "ChatRoom", 0 ))
- if ( CallProtoService( szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND )
+ if ( CallProtoService( szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
bEnabled = true;
}
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index ca7aea8bcd..10eb677481 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -520,28 +520,28 @@ int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam) int TN_ModuleInit()
{
- hPopupsList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST,0,0);
+ hPopupsList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
- OnePopup = M.GetByte(Module,SET_ONEPOPUP,DEF_ONEPOPUP);
- ShowMenu = M.GetByte(Module,SET_SHOWDISABLEMENU,DEF_SHOWDISABLEMENU);
+ OnePopup = M.GetByte(Module, SET_ONEPOPUP, DEF_ONEPOPUP);
+ ShowMenu = M.GetByte(Module, SET_SHOWDISABLEMENU, DEF_SHOWDISABLEMENU);
- int i = M.GetByte(Module,SET_DISABLED,DEF_DISABLED);
+ int i = M.GetByte(Module, SET_DISABLED, DEF_DISABLED);
Disabled = i & 1;
StartDisabled = i & 2;
StopDisabled = i & 4;
- ColorMode = M.GetByte(Module,SET_COLOR_MODE,DEF_COLOR_MODE);
- TimeoutMode = M.GetByte(Module,SET_TIMEOUT_MODE,DEF_TIMEOUT_MODE);
- Timeout = M.GetByte(Module,SET_TIMEOUT,DEF_TIMEOUT);
- TimeoutMode2 = M.GetByte(Module,SET_TIMEOUT_MODE2,DEF_TIMEOUT_MODE2);
- Timeout2 = M.GetByte(Module,SET_TIMEOUT2,DEF_TIMEOUT2);
+ ColorMode = M.GetByte(Module, SET_COLOR_MODE, DEF_COLOR_MODE);
+ TimeoutMode = M.GetByte(Module, SET_TIMEOUT_MODE, DEF_TIMEOUT_MODE);
+ Timeout = M.GetByte(Module, SET_TIMEOUT, DEF_TIMEOUT);
+ TimeoutMode2 = M.GetByte(Module, SET_TIMEOUT_MODE2, DEF_TIMEOUT_MODE2);
+ Timeout2 = M.GetByte(Module, SET_TIMEOUT2, DEF_TIMEOUT2);
if (!(M.GetDword(Module, colorPicker[0].desc, 1) && !M.GetDword(Module, colorPicker[0].desc, 0)))
for (i=0; i < SIZEOF(colorPicker); i++)
colorPicker[i].color = M.GetDword(Module,colorPicker[i].desc,0);
- mir_sntprintf(szStart, sizeof(szStart), TranslateT("...is typing a message."));
- mir_sntprintf(szStop, sizeof(szStop), TranslateT("...has stopped typing."));
+ mir_sntprintf(szStart, SIZEOF(szStart), TranslateT("...is typing a message."));
+ mir_sntprintf(szStop, SIZEOF(szStop), TranslateT("...has stopped typing."));
if (PluginConfig.g_PopupAvail && ShowMenu) {
hTypingNotify = CreateServiceFunction("TypingNotify/EnableDisableMenuCommand", EnableDisableMenuCommand);
|