diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-03 17:32:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-03 17:32:33 +0000 |
commit | f07feab44bd3ef047229f511fadb3a151f200654 (patch) | |
tree | f26853d8f109188dd954dab8ebc121d578343c2d /plugins/SmileyAdd | |
parent | 7844a954c5b636b833d6b2e8f56b316ce18c7ee4 (diff) |
crash fix for SmileyAdd
git-svn-id: http://svn.miranda-ng.org/main/trunk@4295 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd')
-rw-r--r-- | plugins/SmileyAdd/src/SmileyBase.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/SmileyAdd/src/SmileyBase.cpp b/plugins/SmileyAdd/src/SmileyBase.cpp index 9603e6da17..f0107e758c 100644 --- a/plugins/SmileyAdd/src/SmileyBase.cpp +++ b/plugins/SmileyAdd/src/SmileyBase.cpp @@ -366,8 +366,7 @@ HRESULT ISmileyBase::GetTooltip(BSTR *bstrHint) void CloseSmileys(void)
{
- for (int i=regSmileys.getCount(); i--;)
- {
+ for (int i=regSmileys.getCount()-1; i >= 0; i--) {
regSmileys[i]->OnClose();
regSmileys[i]->Close(OLECLOSE_NOSAVE);
}
@@ -375,8 +374,9 @@ void CloseSmileys(void) int CheckForTip(int x, int y, HWND hwnd, TCHAR** smltxt)
{
- for (int i=0; i<regSmileys.getCount(); ++i)
- if (regSmileys[i]->QueryHitPointSpecial(x, y, hwnd, smltxt)) return i;
+ for (int i=0; i < regSmileys.getCount(); ++i)
+ if (regSmileys[i]->QueryHitPointSpecial(x, y, hwnd, smltxt))
+ return i;
return -1;
}
|