From d75d5e8706b06457b799831448f282818233abe9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Apr 2017 22:29:53 +0300 Subject: fix for unset structure field --- plugins/SmileyAdd/src/richcall.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/SmileyAdd/src/richcall.cpp b/plugins/SmileyAdd/src/richcall.cpp index d19d0dbf59..631c70ee96 100644 --- a/plugins/SmileyAdd/src/richcall.cpp +++ b/plugins/SmileyAdd/src/richcall.cpp @@ -67,7 +67,7 @@ static void SetPosition(HWND hwnd) reObj.poleobj->QueryInterface(IID_ISmileyAddSmiley, (void**)&igsc); reObj.poleobj->Release(); - if (igsc == NULL) + if (igsc == nullptr) continue; TextRange->SetRange(reObj.cp, reObj.cp); @@ -75,13 +75,13 @@ static void SetPosition(HWND hwnd) BOOL res; POINT pt; RECT rect; - hr = TextRange->GetPoint(tomStart | TA_BOTTOM | TA_LEFT, &pt.x, &pt.y); + hr = TextRange->GetPoint(tomStart | TA_BOTTOM | TA_RIGHT, &pt.x, &pt.y); if (hr == S_OK) { res = ScreenToClient(hwnd, &pt); rect.bottom = pt.y; - rect.left = pt.x; + rect.right = pt.x; } - else rect.bottom = -1; + else rect.right = rect.bottom = -1; hr = TextRange->GetPoint(tomStart | TA_TOP | TA_LEFT, &pt.x, &pt.y); if (hr == S_OK) { @@ -89,7 +89,7 @@ static void SetPosition(HWND hwnd) rect.top = pt.y; rect.left = pt.x; } - else rect.top = -1; + else rect.left = rect.top = -1; igsc->SetPosition(hwnd, &rect); } -- cgit v1.2.3